Bug 1933640

Summary: [Regression] lvcreate fails to wipe signatures again
Product: Red Hat Enterprise Linux 8 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: YongkuiGuo <yoguo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.4CC: jsuchane, pasik, rjones, virt-maint, yoguo
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libguestfs-1.40.2-28.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1930996 Environment:
Last Closed: 2021-11-09 17:58:01 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: 1930996    
Bug Blocks:    

Description Richard W.M. Jones 2021-03-01 10:30:02 UTC
+++ This bug was initially created as a clone of Bug #1930996 +++

Description of problem:
lvcreate fails to wipe signatures of logical volume in rhel8.4. We hit this issue in rhel8.3 for the first time, and then it was fixed. Please refer to bug 1869118 and bug 1868169. Right now we encountered this issue again.


Version-Release number of selected component (if applicable):
libguestfs-1.44.0-1.module+el8.4.0+9398+f376ac33.x86_64
lvm2-2.03.11-4.el8.x86_64
kernel-4.18.0-287.el8.x86_64


How reproducible:
100%


Steps:

Here is the one-line reproducer:

$ guestfish -N lvfs vgremove VG : vgcreate VG /dev/sda1 : lvcreate LV2 VG 100
libguestfs: error: lvcreate: WARNING: ext2 signature detected on /dev/VG/LV2 at offset 1080. Wipe it? [y/n]: [n]
  Aborted wiping of ext2.
  1 existing signature left on the device.
  Failed to wipe signatures on logical volume VG/LV2.
  Aborting. Failed to wipe start of new LV.

Adding -vx options shows what command is actually run:

commandrvf: lvm lvcreate -L 100 -n LV2 VG

We don't use the --yes option, and perhaps we should.

There is bug https://bugzilla.redhat.com/show_bug.cgi?id=1894692 which is a new
regression against RHEL 8.4.  But it seems that LVM has not really been fixed
again, since QA is now always using the --yes option.

--- Additional comment from Richard W.M. Jones on 2021-02-22 11:05:21 UTC ---

Upstream fix:
https://github.com/libguestfs/libguestfs/commit/21cd97732c4973db835b8b6540c8ad582ebd2bda

Comment 3 YongkuiGuo 2021-04-19 06:41:07 UTC
rjones, do you plan to fix this bug in RHEL-8.5? The same bug has been fixed in RHEL-8.4 AV.

Comment 4 Richard W.M. Jones 2021-04-20 07:14:48 UTC
Yes, I'll build it now.

Comment 8 YongkuiGuo 2021-05-10 03:44:44 UTC
Verified with package:
libguestfs-1.40.2-28.module+el8.5.0+10717+67be7ac4.x86_64


Steps:

1.
$ guestfish -N lvfs vgremove VG : vgcreate VG /dev/sda1 : lvcreate LV2 VG 100

No error like "error: lvcreate: WARNING: ext2 signature detected on /dev/VG/LV2 at offset 1080. Wipe it? [y/n]: [n]"

Comment 10 errata-xmlrpc 2021-11-09 17:58:01 UTC
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 (Moderate: virt:rhel and virt-devel:rhel security, 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/RHSA-2021:4191