View Issue Details

IDProjectCategoryView StatusLast Update
0000107AlmaLinux-8lvm2public2021-07-19 09:32
ReporterSteffanCline Assigned Tosfokin  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
OSAlma Linux 8 
Summary0000107: lvcreate/lvremove not honoring lvm.conf
DescriptionPer RHEL's bugzilla, the issue of lvcreate/lvremove was fixed years ago to automatically ignore previous signatures when wipe_signatures_when_zeroing_new_lvs=1 is set in /etc/lvm/lvm.conf.

# lvcreate -L 10G -n test vg_h6
WARNING: ext4 signature detected on /dev/vg_h6/test at offset 1080. Wipe it? [y/n]: n
  Aborted wiping of ext4.
  1 existing signature left on the device.
  Failed to wipe signatures on logical volume vg_h6/test.
  Aborting. Failed to wipe start of new LV.

While the -y flag exists and does work, it's not supposed to be required.
# lvcreate -y -L 10G -n test vg_h6
  Wiping ext4 signature on /dev/vg_h6/test.
  Logical volume "test" created.

I have tested this on Fedora 33, RHEL8, CentOS 6/7/8 and Amazon Linux and they honor the lvm.conf
Below are some previously reported issues about this.
https://bugzilla.redhat.com/show_bug.cgi?id=997223
https://bugzilla.redhat.com/show_bug.cgi?id=1946199
Steps To ReproduceFresh install of AL 8
Create a LVM
Remove the LVM
Create again
Remove again.

You'll be prompted to enter y/n.
Tagslvcreate, lvm, lvm.conf, lvremove, signatures
abrt_hash
URL

Activities

pastfu

2021-06-30 07:44

reporter   ~0000293

I ran into this when doing a fresh install over an existing CentOS installation. After installation I was unable to boot from the HD with an error indicating dracut scan for cl/root and cl/swap failed. I could only boot by using the installation thumb drive, which I could then remove.

Practical solution for this instance was to rename the volume group name to cl. I can now boot normally from the HD. I used the one line script from here to accomplish the renaming:
https://forums.centos.org/viewtopic.php?t=62406

sfokin

2021-07-19 09:32

developer   ~0000308

I've tested one method in 3 OS and here are results:

===================
# cat /etc/redhat-release
CentOS Linux release 8.4.2105

# grep 'wipe_signatures_when_zeroing_new_lvs' /etc/lvm/lvm.conf
    # Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
    wipe_signatures_when_zeroing_new_lvs = 1

# lvremove /dev/test1/stor1
Do you really want to remove active logical volume test1/stor1? [y/n]: y
  Logical volume "stor1" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# mkfs -t xfs /dev/test1/lvol0
meta-data=/dev/test1/lvol0 isize=512 agcount=4, agsize=624896 blks
         = sectsz=512 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=1, rmapbt=0
         = reflink=1
data = bsize=4096 blocks=2499584, imaxpct=25
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
         = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
WARNING: xfs signature detected on /dev/test1/lvol0 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/test1/lvol0.
  Logical volume "lvol0" created.

===================
# cat /etc/redhat-release
CentOS Stream release 8

# grep 'wipe_signatures_when_zeroing_new_lvs' /etc/lvm/lvm.conf
    # Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
    wipe_signatures_when_zeroing_new_lvs = 1

# lvremove /dev/test1/stor1
Do you really want to remove active logical volume test1/stor1? [y/n]: y
  Logical volume "stor1" successfully removed.

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed.

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed.

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# mkfs -t xfs /dev/test1/lvol0
meta-data=/dev/test1/lvol0 isize=512 agcount=4, agsize=624896 blks
         = sectsz=512 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=1, rmapbt=0
         = reflink=1
data = bsize=4096 blocks=2499584, imaxpct=25
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
         = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed.

# lvcreate -l 100%FREE test1
WARNING: xfs signature detected on /dev/test1/lvol0 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/test1/lvol0.
  Logical volume "lvol0" created.

===================
# cat /etc/redhat-release
AlmaLinux release 8.4 (Electric Cheetah)

# grep 'wipe_signatures_when_zeroing_new_lvs' /etc/lvm/lvm.conf
    # Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
    wipe_signatures_when_zeroing_new_lvs = 1

# lvremove /dev/test1/stor1
Do you really want to remove active logical volume test1/stor1? [y/n]: y
  Logical volume "stor1" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
  Logical volume "lvol0" created.

# mkfs -t xfs /dev/test1/lvol0
meta-data=/dev/test1/lvol0 isize=512 agcount=4, agsize=624896 blks
         = sectsz=512 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=1, rmapbt=0
         = reflink=1
data = bsize=4096 blocks=2499584, imaxpct=25
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
         = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

# lvremove /dev/test1/lvol0
Do you really want to remove active logical volume test1/lvol0? [y/n]: y
  Logical volume "lvol0" successfully removed

# lvcreate -l 100%FREE test1
WARNING: xfs signature detected on /dev/test1/lvol0 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/test1/lvol0.
  Logical volume "lvol0" created.

===================
As you can see all OS have the same result.
Is it normal behavior?

Issue History

Date Modified Username Field Change
2021-06-27 21:53 SteffanCline New Issue
2021-06-27 21:53 SteffanCline Tag Attached: lvcreate
2021-06-27 21:53 SteffanCline Tag Attached: lvm
2021-06-27 21:53 SteffanCline Tag Attached: lvm.conf
2021-06-27 21:53 SteffanCline Tag Attached: lvremove
2021-06-27 21:53 SteffanCline Tag Attached: signatures
2021-06-30 07:44 pastfu Note Added: 0000293
2021-07-13 11:45 alukoshko Assigned To => sfokin
2021-07-13 11:45 alukoshko Status new => assigned
2021-07-19 09:32 sfokin Note Added: 0000308