Bug 2162144
| Summary: | lvresize should only resize crypt device when resizing file system | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | David Teigland <teigland> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, mpitt, msnitzer, prajnoha, thornber, zkabelac |
| Version: | 9.1 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.17-6.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-09 08:23:51 UTC | 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: | |||
|
Description
David Teigland
2023-01-18 22:37:44 UTC
Corey pointed out these unexpected cryptsetup resize commands in some tests he was running: [root@virt-557 ~]# lvextend --yes -L +808M resize_matrix/resize_lv Size of logical volume resize_matrix/resize_lv changed from <31.58 GiB (8084 extents) to <32.37 GiB (8286 extents). Logical volume resize_matrix/resize_lv successfully resized. [root@virt-557 ~]# lvreduce --yes -L -560M resize_matrix/resize_lv File system found on crypt device /dev/dm-3 on LV resize_matrix/resize_lv. File system size 34150023168b is adjusted for crypt data offset 16777216b. File system ext4+crypto_LUKS found on resize_matrix/resize_lv. File system size (29.98 GiB) is smaller than the requested size (31.80 GiB). File system reduce is not needed, skipping. cryptsetup resize 66699264 sectors /dev/dm-3 Enter passphrase for /dev/mapper/resize_matrix-resize_lv: fix in main: https://sourceware.org/git/?p=lvm2.git;a=commit;h=3bb55765286dc8e4f0000957d85a6b8ee2752852 *** Bug 2162305 has been marked as a duplicate of this bug. *** ITR? DTM? Marking Verified:Fixed in the latest build. kernel-5.14.0-252.el9 BUILT: Wed Feb 1 03:30:10 PM CET 2023 lvm2-2.03.17-6.el9 BUILT: Thu Feb 9 09:52:52 PM CET 2023 lvm2-libs-2.03.17-6.el9 BUILT: Thu Feb 9 09:52:52 PM CET 2023 The example in comment #1 no longer prompts for (or requires) a LUKS password when the lvreduce command determines that the filesystem is not to be reduced. [root@virt-008 ~]# lvextend --yes -L +870M resize_matrix/resize_lv Rounding size to boundary between physical extents: 872.00 MiB. Size of logical volume resize_matrix/resize_lv changed from 30.00 GiB (7680 extents) to 30.85 GiB (7898 extents). Logical volume resize_matrix/resize_lv successfully resized. [root@virt-008 ~]# lvreduce --yes -L -543M resize_matrix/resize_lv Rounding size to boundary between physical extents: 540.00 MiB. File system found on crypt device /dev/dm-3 on LV resize_matrix/resize_lv. File system size 32543604736b is adjusted for crypt data offset 16777216b. File system ext4+crypto_LUKS found on resize_matrix/resize_lv. File system size (29.98 GiB) is smaller than the requested size (<30.31 GiB). File system reduce is not needed, skipping. crypt device is already reduced to 32195477504 bytes. Size of logical volume resize_matrix/resize_lv changed from 30.85 GiB (7898 extents) to 30.32 GiB (7763 extents). Logical volume resize_matrix/resize_lv successfully resized. [root@virt-008 ~]# lvreduce --yes -L -543M --fs resize resize_matrix/resize_lv Rounding size to boundary between physical extents: 540.00 MiB. File system found on crypt device /dev/dm-3 on LV resize_matrix/resize_lv. File system size 32891731968b is adjusted for crypt data offset 16777216b. File system ext4+crypto_LUKS found on resize_matrix/resize_lv. File system size (29.98 GiB) is smaller than the requested size (30.63 GiB). File system reduce is not needed, skipping. crypt device is already reduced to 32195477504 bytes. Size of logical volume resize_matrix/resize_lv changed from <31.18 GiB (7981 extents) to <30.65 GiB (7846 extents). Logical volume resize_matrix/resize_lv successfully resized. LUKS + LVM resize regression testing is complete on the latest build. Marking VERIFIED.
kernel-5.14.0-252.el9 BUILT: Wed Feb 1 03:30:10 PM CET 2023
lvm2-2.03.17-7.el9 BUILT: Thu Feb 16 03:24:54 PM CET 2023
lvm2-libs-2.03.17-7.el9 BUILT: Thu Feb 16 03:24:54 PM CET 2023
lvm2-dbusd-2.03.17-7.el9 BUILT: Thu Feb 16 03:25:07 PM CET 2023
luks_ext4_active_reduce_no_resizefs -- Create an Encrypted LUKs EXT4 filesysem and attempt to reduce the size while ACTIVE but w/o --fs resize
luks_ext4_active_reduce_ignorefs -- Create an Encrypted LUKs EXT4 filesysem and reduce the size while ACTIVE, using --fs ignore which could potentially cause corruption
luks_ext4_active_reduce_resizefs -- Create an Encrypted LUKs EXT4 filesysem and reduce the size while ACTIVE, using --fs resize and --resizefs (bug 2157591)
luks_ext4_inactive_reduce_no_resizefs -- Create an Encrypted LUKs EXT4 filesysem and attempt to reduce the size while INACTIVE w/o --fs resize
luks_ext4_active_reduce_wo_touching_fs_space -- Create an Encrypted LUKs EXT4 filesysem, extend the volume, and then reduce the space wo touching the filesystem area while ACTIVE (bug 2157591|2162144)
luks_ext4_inactive_reduce_wo_touching_fs_space -- Create an Encrypted LUKs EXT4 filesysem, extend the volume, and then reduce the space wo touching the filesystem area while INACTIVE
luks_no_fs_active_reduce -- Create a variety of Encrypted LUKS LV types and reduce the size while ACTIVE and w/o a filesystem
luks_no_fs_inactive_reduce -- Create a variety of Encrypted LUKS LV types and attempt to reduce the size while INACTIVE and w/o a filesystem
luks_ext4_active_extend_no_resizefs -- Create an Encrypted LUKs EXT4 filesysem and extend the size while ACTIVE w/o using the --fs resize flag
luks_ext4_inactive_extend_no_resizefs -- Create an Encrypted LUKs EXT4 filesysem and extend the size while INACTIVE w/o using the --fs resize flag
luks_no_fs_active_extend -- Create a variety of Encrypted LUKS LV types and extend the size while ACTIVE and w/o a filesystem
luks_no_fs_inactive_extend -- Create a variety of Encrypted LUKS LV types and attempt to extend the size while INACTIVE and w/o a filesystem
luks_no_fs_active_resizefs_extend -- Create a variety of Encrypted LUKS LV types and attempt to extend the size while ACTIVE and w/o a filesystem, but with the use of --fs resize
luks_no_fs_inactive_resizefs_extend -- Create a variety of Encrypted LUKS LV types and attempt to extend the size while INACTIVE and w/o a filesystem, but with the use of --fs resize (bug 2165691)
luks_ext4_active_online_traditional_resizefs_fsresize_fsignore_extend -- Create an Encrypted LUKs EXT4 filesystem on a variety of LV types and extend the size while ACTIVE and ONLINE, using the traditional --resizefs flag as well as --fs resize, and --fs ignore
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2544 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |