Bug 1894692
Summary: | lvcreate behavior change when detected signature is found | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | agk, cluster-qe, heinzm, jbrassow, mcsontos, msnitzer, nsoffer, pasik, prajnoha, rjones, thornber, yoguo, zkabelac |
Version: | 8.4 | Keywords: | Triaged |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.03.11-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1868169 | Environment: | |
Last Closed: | 2021-05-18 15:02:04 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: | |||
Bug Depends On: | 1868169 | ||
Bug Blocks: |
Comment 2
Corey Marthaler
2020-11-04 19:31:35 UTC
The logic of wiping has been updated. Internal devices for raid no longer needs confirmation of zeroing. Error in wiping will stop whole command. Fix verified in the latest rpms. Side note, all LVM regression testing is now done with the --yes flag to avoid this. kernel-4.18.0-271.el8 BUILT: Fri Jan 8 03:32:43 CST 2021 lvm2-2.03.11-0.4.20201222gitb84a992.el8 BUILT: Tue Dec 22 06:33:49 CST 2020 lvm2-libs-2.03.11-0.4.20201222gitb84a992.el8 BUILT: Tue Dec 22 06:33:49 CST 2020 [root@host-087 ~]# pvscan PV /dev/sde1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdc1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdd1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdb1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdf1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdg1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/sdh1 VG VG lvm2 [<29.99 GiB / <29.99 GiB free] PV /dev/vda2 VG rhel_host-087 lvm2 [<7.00 GiB / 1.40 GiB free] Total: 8 [216.91 GiB] / in use: 8 [216.91 GiB] / in no VG: 0 [0 ] [root@host-087 ~]# lvcreate --type raid6_la_6 -R 8192.00k -i 5 -n takeover -l 720 VG Using default stripesize 64.00 KiB. Logical volume "takeover" created. [root@host-087 ~]# mkfs.xfs /dev/VG/takeover meta-data=/dev/VG/takeover isize=512 agcount=8, agsize=92144 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=737152, imaxpct=25 = sunit=16 swidth=80 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=16 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@host-087 ~]# lvremove -f VG/takeover Logical volume "takeover" successfully removed # Verified that the logical volume is no longer auto creating w/o a y answer to the prompt. [root@host-087 ~]# lvcreate --type raid6_la_6 -R 8192.00k -i 5 -n takeover -l 720 VG Using default stripesize 64.00 KiB. WARNING: xfs signature detected on /dev/VG/takeover at offset 0. Wipe it? [y/n]: WARNING: Invalid input ''. WARNING: xfs signature detected on /dev/VG/takeover at offset 0. Wipe it? [y/n]: WARNING: Invalid input ''. WARNING: xfs signature detected on /dev/VG/takeover at offset 0. Wipe it? [y/n]: ^C Interrupted... Aborted wiping of xfs. 1 existing signature left on the device. Interrupted... Interrupted initialization of logical volume VG/takeover. Aborting. Failed to wipe start of new LV. # With the "--yes" it creates the LV [root@host-087 ~]# lvcreate --yes --type raid6_la_6 -R 8192.00k -i 5 -n takeover -l 720 VG Using default stripesize 64.00 KiB. Wiping xfs signature on /dev/VG/takeover. Logical volume "takeover" created. This change broke libguestfs twice, firstly in bug 1869118 / bug 1868169 (RHEL 8.3) and now in bug 1930996 (RHEL 8.4). We don't use the --yes option because it was not needed, and we don't care about existing signatures and want LVM to just wipe them without prompting. What can we do to make sure LVM never prompts? (In reply to Richard W.M. Jones from comment #12) > This change broke libguestfs twice, firstly in bug 1869118 / bug 1868169 > (RHEL 8.3) > and now in bug 1930996 (RHEL 8.4). We don't use the --yes option because it > was not needed, and we don't care about existing signatures and want LVM to > just wipe them without prompting. What can we do to make sure LVM never > prompts? See the comment 4 When the user does not want lvm2 to check for signatures and prompt for wiping - he needs to disable them in lvm.conf. I'd advice to use such condition only in controlled environment. AIUI those flags disable signature wiping. What we'd like is for LVM to wipe without asking. (Actually what we'd *really* want is for LVM to always present us with zeroed devices, preferably ones which are zeroed in the background.) Anyway for the moment I added lvcreate --yes flag. Ahh - so then user is supposed to use --yes in scripts (as default is 'no') - and we always try to make it more and more consistent. In some case you may need also to use --force. ATM I'd say it's rather intentional - we require usage of --yes on cmdline - as the command itself is logged in the history of metadata, so we know what has caused data overwrites. It's not technically difficult to add lvm.conf 'always yes' option - but there is big problem with abuse of such option. We made the change in libguestfs on the lvcreate command line. For libguestfs because we run in a controlled environment with our own lvm.conf a configuration option might still be helpful. This may be a "fix" for inconsistent behavior, but it seems to break also RHV see bug 1946199. (In reply to Nir Soffer from comment #17) > This may be a "fix" for inconsistent behavior, but it seems to break also RHV > see bug 1946199. Please see the comment 4 how to get 'old' behavior aka creation without wiping. (Lvm2 always tries to provides backward compatibility through lvm.conf setting) 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-2021:1659 |