Bug 2212295
| Summary: | lvresize fail in case of multiple mountpoints | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Maik Stübner <maik.stuebner> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> |
| Status: | VERIFIED --- | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, shivgupt, teigland, thornber, zkabelac |
| Version: | 9.2 | Keywords: | Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.21-3.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
fixed in main: https://sourceware.org/git/?p=lvm2.git;a=commit;h=7c3eca833ff7878d6d32198ed76380c91fdc15fc mount same LV in two places --------------------------- $ mount /dev/gg/lvol0 /foo $ mount /dev/gg/lvol0 /bar $ grep lvol0 /proc/mounts /dev/mapper/gg-lvol0 /foo xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 /dev/mapper/gg-lvol0 /bar xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 $ lvextend -L+8M -r gg/lvol0 Size of logical volume gg/lvol0 changed from 316.00 MiB (79 extents) to 324.00 MiB (81 extents). File system xfs found on gg/lvol0 mounted at /bar. Extending file system xfs to 324.00 MiB (339738624 bytes) on gg/lvol0... xfs_growfs /dev/gg/lvol0 meta-data=/dev/mapper/gg-lvol0 isize=512 agcount=5, agsize=19200 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=80896, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 80896 to 82944 xfs_growfs done Extended file system xfs on gg/lvol0. Logical volume gg/lvol0 successfully resized. $ lvrename gg/lvol0 gg/lvol1 Renamed "lvol0" to "lvol1" in volume group "gg" $ grep -e lvol /proc/mounts /dev/mapper/gg-lvol0 /foo xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 /dev/mapper/gg-lvol0 /bar xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 $ lvextend -L+8M -r gg/lvol0 Failed to find logical volume "gg/lvol0" $ lvextend -L+8M -r gg/lvol1 LV /dev/mapper/gg-lvol1 mounted at /foo may have been renamed (from /dev/mapper/gg-lvol0). File system resizing not supported: fs utilities do not support renamed devices. $ umount /bar $ lvextend -L+8M -r gg/lvol1 LV /dev/mapper/gg-lvol1 mounted at /foo may have been renamed (from /dev/mapper/gg-lvol0). File system resizing not supported: fs utilities do not support renamed devices. $ umount /foo $ lvextend -L+8M -r gg/lvol1 Size of logical volume gg/lvol1 changed from 324.00 MiB (81 extents) to 332.00 MiB (83 extents). File system xfs found on gg/lvol1. File system mount is needed for extend. Continue with xfs file system extend steps: mount, xfs_growfs? [y/n]:y Extending file system xfs to 332.00 MiB (348127232 bytes) on gg/lvol1... mount /dev/gg/lvol1 /tmp/tmp.iiDuk52qyy_lvresize_492728 mount done xfs_growfs /dev/gg/lvol1 meta-data=/dev/mapper/gg-lvol1 isize=512 agcount=5, agsize=19200 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=82944, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 82944 to 84992 xfs_growfs done cleanup unmount /tmp/tmp.iiDuk52qyy_lvresize_492728 cleanup unmount done Extended file system xfs on gg/lvol1. Logical volume gg/lvol1 successfully resized. similar test with bind mount ---------------------------- $ mount /dev/gg/lvol1 /foo $ mount --bind /foo /bar $ grep lvol /proc/mounts /dev/mapper/gg-lvol1 /foo xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 /dev/mapper/gg-lvol1 /bar xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 $ lvextend -L+8M -r gg/lvol1 Size of logical volume gg/lvol1 changed from 332.00 MiB (83 extents) to 340.00 MiB (85 extents). File system xfs found on gg/lvol1 mounted at /bar. Extending file system xfs to 340.00 MiB (356515840 bytes) on gg/lvol1... xfs_growfs /dev/gg/lvol1 meta-data=/dev/mapper/gg-lvol1 isize=512 agcount=5, agsize=19200 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=84992, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 84992 to 87040 xfs_growfs done Extended file system xfs on gg/lvol1. Logical volume gg/lvol1 successfully resized. $ lvrename gg/lvol1 gg/lvol2 Renamed "lvol1" to "lvol2" in volume group "gg" $ grep lvol /proc/mounts /dev/mapper/gg-lvol1 /foo xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 /dev/mapper/gg-lvol1 /bar xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 $ lvextend -L+8M -r gg/lvol1 Failed to find logical volume "gg/lvol1" $ lvextend -L+8M -r gg/lvol2 LV /dev/mapper/gg-lvol2 mounted at /foo may have been renamed (from /dev/mapper/gg-lvol1). File system resizing not supported: fs utilities do not support renamed devices. similar test with bind mount of subdir -------------------------------------- $ mount /dev/gg/lvol2 /foo $ mkdir /foo/A $ touch /foo/A/file $ mount --bind /foo/A /bar $ ls /foo A/ $ ls /bar file $ grep lvol /proc/mounts /dev/mapper/gg-lvol2 /foo xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 /dev/mapper/gg-lvol2 /bar xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 $ lvextend -L+8M -r gg/lvol2 Size of logical volume gg/lvol2 changed from 340.00 MiB (85 extents) to 348.00 MiB (87 extents). File system xfs found on gg/lvol2 mounted at /bar. Extending file system xfs to 348.00 MiB (364904448 bytes) on gg/lvol2... xfs_growfs /dev/gg/lvol2 meta-data=/dev/mapper/gg-lvol2 isize=512 agcount=5, agsize=19200 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=87040, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 87040 to 89088 xfs_growfs done Extended file system xfs on gg/lvol2. Logical volume gg/lvol2 successfully resized. $ lvrename gg/lvol2 gg/lvol3 Renamed "lvol2" to "lvol3" in volume group "gg" $ lvextend -L+8M -r gg/lvol3 LV /dev/mapper/gg-lvol3 mounted at /foo may have been renamed (from /dev/mapper/gg-lvol2). File system resizing not supported: fs utilities do not support renamed devices. *** Bug 2211856 has been marked as a duplicate of this bug. *** Marking Verified:Tested with the latest build.
kernel-5.14.0-332.el9 BUILT: Mon Jun 26 06:16:51 PM CEST 2023
lvm2-2.03.21-3.el9 BUILT: Thu Jul 13 08:50:26 PM CEST 2023
lvm2-libs-2.03.21-3.el9 BUILT: Thu Jul 13 08:50:26 PM CEST 2023
SCENARIO - xfs_active_online_multi_mount_traditional_resizefs_fsresize_extend: Create an XFS filesystem on a variety of LV types and extend the size while ACTIVE and ONLINE, using the traditional --resizefs flag and --fs resize bug (2212295)
[...]
lvcreate --yes --type raid1 -n resize_lv -L 30G -m 2 resize_matrix
Logical volume "resize_lv" created.
mkfs --type xfs -f /dev/resize_matrix/resize_lv
meta-data=/dev/resize_matrix/resize_lv isize=512 agcount=4, agsize=1966080 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
data = bsize=4096 blocks=7864320, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=16384, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
mount /dev/resize_matrix/resize_lv /mnt/resize_lvA
mount /dev/resize_matrix/resize_lv /mnt/resize_lvB
mount /dev/resize_matrix/resize_lv /mnt/resize_lvC
Writing files to /mnt/resize_lvC
/usr/tests/sts-rhel9.3/bin/checkit -w /mnt/resize_lvC -f /tmp/Filesystem.2083847 -n 2500
Checking files from /mnt/resize_lvC
/usr/tests/sts-rhel9.3/bin/checkit -w /mnt/resize_lvC -f /tmp/Filesystem.2083847 -v
Starting dd io to xfs filesystem to be resized
Resize the open LVM filesystem multiple times with lvextend/fsadm on virt-009.cluster-qe.lab.eng.brq.redhat.com
++ itr --fs resize ++
Adding additional space to resize_matrix/resize_lv on virt-009.cluster-qe.lab.eng.brq.redhat.com
lvextend --yes --fs resize -L +483M resize_matrix/resize_lv
Rounding size to boundary between physical extents: 484.00 MiB.
Extending 3 mirror images.
Size of logical volume resize_matrix/resize_lv changed from 30.00 GiB (7680 extents) to 30.47 GiB (7801 extents).
File system xfs found on resize_matrix/resize_lv mounted at /mnt/resize_lvC.
Extending file system xfs to 30.47 GiB (32719765504 bytes) on resize_matrix/resize_lv...
xfs_growfs /dev/resize_matrix/resize_lv
meta-data=/dev/mapper/resize_matrix-resize_lv isize=512 agcount=4, agsize=1966080 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
data = bsize=4096 blocks=7864320, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=16384, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7864320 to 7988224
xfs_growfs done
Extended file system xfs on resize_matrix/resize_lv.
Logical volume resize_matrix/resize_lv successfully resized.
PRE:31391744 POST:31887360
PRE:31457280.0 POST:31952896.0
Checking files from /mnt/resize_lvC
/usr/tests/sts-rhel9.3/bin/checkit -w /mnt/resize_lvC -f /tmp/Filesystem.2083847 -v
++ itr --resizefs ++
Adding additional space to resize_matrix/resize_lv on virt-009.cluster-qe.lab.eng.brq.redhat.com
lvextend --yes --resizefs -L +355M resize_matrix/resize_lv
Rounding size to boundary between physical extents: 356.00 MiB.
Extending 3 mirror images.
Size of logical volume resize_matrix/resize_lv changed from 30.47 GiB (7801 extents) to 30.82 GiB (7890 extents).
File system xfs found on resize_matrix/resize_lv mounted at /mnt/resize_lvC.
Extending file system xfs to 30.82 GiB (33093058560 bytes) on resize_matrix/resize_lv...
xfs_growfs /dev/resize_matrix/resize_lv
meta-data=/dev/mapper/resize_matrix-resize_lv isize=512 agcount=5, agsize=1966080 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
data = bsize=4096 blocks=7988224, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=16384, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7988224 to 8079360
xfs_growfs done
Extended file system xfs on resize_matrix/resize_lv.
Logical volume resize_matrix/resize_lv successfully resized.
PRE:31887360 POST:32251904
PRE:31952896.0 POST:32317440.0
Checking files from /mnt/resize_lvC
/usr/tests/sts-rhel9.3/bin/checkit -w /mnt/resize_lvC -f /tmp/Filesystem.2083847 -v
++ itr -r ++
Adding additional space to resize_matrix/resize_lv on virt-009.cluster-qe.lab.eng.brq.redhat.com
lvextend --yes -r -L +479M resize_matrix/resize_lv
Rounding size to boundary between physical extents: 480.00 MiB.
Extending 3 mirror images.
Size of logical volume resize_matrix/resize_lv changed from 30.82 GiB (7890 extents) to <31.29 GiB (8010 extents).
File system xfs found on resize_matrix/resize_lv mounted at /mnt/resize_lvC.
Extending file system xfs to <31.29 GiB (33596375040 bytes) on resize_matrix/resize_lv...
xfs_growfs /dev/resize_matrix/resize_lv
meta-data=/dev/mapper/resize_matrix-resize_lv isize=512 agcount=5, agsize=1966080 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
data = bsize=4096 blocks=8079360, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=16384, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 8079360 to 8202240
xfs_growfs done
Extended file system xfs on resize_matrix/resize_lv.
Logical volume resize_matrix/resize_lv successfully resized.
PRE:32251904 POST:32743424
PRE:32317440.0 POST:32808960.0
Checking files from /mnt/resize_lvC
/usr/tests/sts-rhel9.3/bin/checkit -w /mnt/resize_lvC -f /tmp/Filesystem.2083847 -v
umount /mnt/resize_lvA
umount /mnt/resize_lvB
umount /mnt/resize_lvC
lvremove -f resize_matrix/resize_lv
Logical volume "resize_lv" successfully removed.
|
Description of problem: If you mount a new lv on 2 or more mountpoints the resize failed with the message: "File system resizing not supported: fs utilities do not support renamed devices." This can be, when you run container on the system Version-Release number of selected component (if applicable): LVM version: 2.03.17(2) (2022-11-10) Library version: 1.02.187 (2022-11-10) Driver version: 4.47.0 How reproducible: - create LV - mount at 2 mountpoints - resize LV Steps to Reproduce: 1. mount LV with 2 mountpoints # lvcreate -n lv_foo -L32m /dev/vg_system Logical volume "lv_foo" created. # mkfs.xfs /dev/mapper/vg_system-lv_foo meta-data=/dev/mapper/vg_system-lv_foo isize=512 agcount=2, agsize=4096 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=8192, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 Discarding blocks...Done. # mkdir /foo # mkdir /bar # mount /dev/mapper/vg_system-lv_foo /foo # lvresize -r -L+32m /dev/vg_system/lv_foo Size of logical volume vg_system/lv_foo changed from 32.00 MiB (1 extents) to 64.00 MiB (2 extents). File system xfs found on vg_system/lv_foo mounted at /foo. Extending file system xfs to 64.00 MiB (67108864 bytes) on vg_system/lv_foo... xfs_growfs /dev/vg_system/lv_foo meta-data=/dev/mapper/vg_system-lv_foo isize=512 agcount=2, agsize=4096 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=1 inobtcount=1 data = bsize=4096 blocks=8192, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 8192 to 16384 xfs_growfs done Extended file system xfs on vg_system/lv_foo. Logical volume vg_system/lv_foo successfully resized. # mount /dev/mapper/vg_system-lv_foo /bar # lvresize -r -L+32m /dev/vg_system/lv_foo LV /dev/mapper/vg_system-lv_foo mounted at /foo may have been renamed (from /dev/mapper/vg_system-lv_foo). File system resizing not supported: fs utilities do not support renamed devices. 2. start container on a /var LV # podman run -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd Trying to pull registry.fedoraproject.org/f29/httpd:latest... Getting image source signatures Copying blob d77ff9f653ce done Copying blob 7692efc5f81c done Copying blob aaf5ad2e1aa3 done Copying config 25c76f9dcd done Writing manifest to image destination Storing signatures 0b74174915c53686a5c9cb81bc0d335a5829540a0b99c6ddd756706d38812631 # mount ... /dev/mapper/vg_system-lv_root on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/sda2 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro) /dev/mapper/vg_system-lv_var on /var type xfs (rw,nosuid,nodev,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/vg_system-lv_var on /var/lib/containers/storage/overlay type xfs (rw,nosuid,nodev,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota) overlay on /var/lib/containers/storage/overlay/61ee6d43af770fb6b4d9c5a9a9f9ae99992887d5bc345d39ac17e9cfe9d88396/merged type overlay (rw,nodev,relatime,context="system_u:object_r:container_file_t:s0:c891,c981",lowerdir=/var/lib/containers/storage/overlay/l/2FMLLI57JJ34FD42PMKWHLPNED:/var/lib/containers/storage/overlay/l/E2YQF352QMHMS4I7GWQWGX6LKB:/var/lib/containers/storage/overlay/l/4HZQNHRSRMYAY6OSUCX2XTSPFN,upperdir=/var/lib/containers/storage/overlay/61ee6d43af770fb6b4d9c5a9a9f9ae99992887d5bc345d39ac17e9cfe9d88396/diff,workdir=/var/lib/containers/storage/overlay/61ee6d43af770fb6b4d9c5a9a9f9ae99992887d5bc345d39ac17e9cfe9d88396/work,metacopy=on) ... # lvresize -r -L+32m /dev/vg_system/lv_var LV /dev/mapper/vg_system-lv_var mounted at /var may have been renamed (from /dev/mapper/vg_system-lv_var). File system resizing not supported: fs utilities do not support renamed devices. Actual results: LV can only resized, when additional mount is unmounted. Expected results: LV can also resized, when it has multiple mountpoints (like in RHEL9.1, 8.x, 7.x) Additional info: