Bug 1930996 - [Regression] lvcreate fails to wipe signatures again
Summary: [Regression] lvcreate fails to wipe signatures again
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.4
Assignee: Virtualization Maintenance
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks: 1933640
TreeView+ depends on / blocked
 
Reported: 2021-02-20 02:42 UTC by YongkuiGuo
Modified: 2021-05-25 06:47 UTC (History)
3 users (show)

Fixed In Version: libguestfs-1.44.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1933640 (view as bug list)
Environment:
Last Closed: 2021-05-25 06:47:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description YongkuiGuo 2021-02-20 02:42:18 UTC
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:

1. On rhel8.4 host with RHEL-8.4.0-20210218.0 compose
# qemu-img create -f raw test.img 1G
Formatting 'test.img', fmt=raw size=1073741824

2.
# guestfish -a test.img
><fs> run
><fs> pvcreate /dev/sda
><fs> vgcreate vol_test /dev/sda
><fs> lvcreate vol_file1 vol_test 1000
><fs> mkfs ext2 /dev/vol_test/vol_file1
><fs> vgremove vol_test
><fs> vgcreate vol_test /dev/sda
><fs> lvcreate vol_file2 vol_test 500
libguestfs: error: lvcreate: WARNING: ext2 signature detected on /dev/vol_test/vol_file2 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 vol_test/vol_file2.
  Aborting. Failed to wipe start of new LV.
><fs>

Actual results:
As above

Expected results:
The lvcreate command can be executed successfully.

Additional info:

Comment 1 Richard W.M. Jones 2021-02-22 09:43:43 UTC
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.

Comment 6 YongkuiGuo 2021-02-24 08:02:37 UTC
Verified with package:
libguestfs-1.44.0-2.module+el8.4.0+10146+75917d2f.x86_64

Steps:

1. On rhel8.4 host
$ 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 8 errata-xmlrpc 2021-05-25 06:47:27 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 (virt:av 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:2098


Note You need to log in before you can comment on or make changes to this bug.