Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 649334

Summary: lvcreate --test reports error that appears that test failed
Product: Red Hat Enterprise Linux 6 Reporter: Debbie Johnson <dejohnso>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: agk, bmarzins, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, ndoane, prajnoha, prockai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.82-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 667174 (view as bug list) Environment:
Last Closed: 2011-05-19 14:27:04 UTC Type: ---
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:    
Bug Blocks: 667174    
Attachments:
Description Flags
proposed patch none

Description Debbie Johnson 2010-11-03 15:00:38 UTC
Created attachment 457460 [details]
proposed patch

Description of problem:
lvcreate fails with "Aborting. Failed to activate new LV to wipe the start of it."

Version-Release number of selected component (if applicable):


How reproducible:
everytime

Steps to Reproduce:
There is ample room available from vgdisplay command to add another LV however the lvcreate command produces this error message:
[root@zcarh0tx ~]# lvcreate --test --name LVolSwap --size 2000M Volume00
Test mode: Metadata will NOT be updated.
Rounding up size to full physical extent 1.97 GB
Aborting. Failed to activate new LV to wipe the start of it.
Unable to deactivate failed new LV. Manual intervention required.
[root@zcarh0tx ~]# 
  


Expected results:
Patch was created and customer tested and is pleased with new message.  I will attach patch file.

Test output of patch:

[root@rcarh357 ~]# rpm -Uvh --oldpackage lvm2-2.02.42-5_SF361108.el4_8.3.i386.rpm
Preparing...                ########################################### [100%]
   1:lvm2                   ########################################### [100%]
[root@rcarh357 ~]# rpm -qa lvm2
lvm2-2.02.42-5_SF361108.el4_8.3
[root@rcarh357 ~]# lvcreate --test --name LVolSwap --size 2000M Volume00
  Test mode: Metadata will NOT be updated.
  Rounding up size to full physical extent 1.97 GB
  Test. New LV not activated.
[root@rcarh357 ~]#

Comment 2 Ben Marzinski 2010-11-04 04:06:00 UTC
This is reproduceable on RHEL6

[root@ask-06 gfs2-2.6-nmw]# cat /etc/redhat-release 
Red Hat Enterprise Linux FoundationServer release 6.0 Beta (Santiago)
[root@ask-06 gfs2-2.6-nmw]# rpm -q lvm2
lvm2-2.02.66-2.el6.x86_64
[root@ask-06 gfs2-2.6-nmw]# pvcreate /dev/sde
  Physical volume "/dev/sde" successfully created
[root@ask-06 gfs2-2.6-nmw]# vgcreate test /dev/sde
  Volume group "test" successfully created
[root@ask-06 gfs2-2.6-nmw]# lvcreate --test -l 100%VG test
  Test mode: Metadata will NOT be updated.
  Aborting. Failed to activate new LV to wipe the start of it.
  Unable to deactivate failed new LV. Manual intervention required.

Comment 4 Corey Marthaler 2011-01-04 17:48:20 UTC
I assume that when this bug is fixed, these commands should pass even though they don't create anything, because the operation "should" work?

# LV
[root@taft-02 ~]# lvcreate --test -n lv -L 100M taft
  Test mode: Metadata will NOT be updated.
  Failed to activate new LV.
  Unable to deactivate failed new LV. Manual intervention required.

# MIRROR
[root@taft-02 ~]# lvcreate --test -m 1 -n mirror -L 100M taft
  Test mode: Metadata will NOT be updated.
  Aborting. Failed to activate mirror log.
  Failed to initialise mirror log.

# SNAPSHOT
[root@taft-02 ~]# lvcreate --test -s taft/lv -L 10M
  Test mode: Metadata will NOT be updated.
  Rounding up size to full physical extent 12.00 MB
  Aborting. Failed to activate snapshot exception store.

Comment 5 Alasdair Kergon 2011-01-04 20:20:13 UTC
Yes: When fixed, those error messages should not appear and it should exit successfully instead.

Comment 6 Alasdair Kergon 2011-01-24 14:19:23 UTC
In 2.02.82.

Comment 8 Corey Marthaler 2011-03-10 18:46:22 UTC
Fix verified in the latest rpms.
2.6.32-114.0.1.el6.x86_64

lvm2-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-libs-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-cluster-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
udev-147-2.33.el6    BUILT: Wed Feb  9 09:56:24 CST 2011
device-mapper-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
cmirror-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011


[root@grant-01 ~]# lvcreate --test -n lv -L 100M grant
  Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
  Logical volume "lv" created
[root@grant-01 ~]# echo $?
0

[root@grant-01 ~]# lvcreate --test -m 1 -n mirror -L 100M grant
  Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
  Logical volume "mirror" created
[root@grant-01 ~]# echo $?
0

[root@grant-01 ~]# lvcreate -n lv -L 100M grant
  Logical volume "lv" created
[root@grant-01 ~]# lvcreate --test -s grant/lv -L 10M
  Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
  Rounding up size to full physical extent 12.00 MiB
  Logical volume "lvol0" created
[root@grant-01 ~]# echo $?
0

Comment 11 errata-xmlrpc 2011-05-19 14:27:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0772.html