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 1140128 - When thin pool creation is aborted, a left-over linear LV appears in the system.
Summary: When thin pool creation is aborted, a left-over linear LV appears in the system.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-10 10:56 UTC by Nenad Peric
Modified: 2015-07-22 07:35 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.117-1.el6
Doc Type: Bug Fix
Doc Text:
When volume list prohibited activation of volumes during thin pool creation on error code path some volumes could have been left in device mapper table active without proper lock being held. All such volumes are now properly deactivated first before tool exits.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:35:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1411 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-07-20 18:06:52 UTC

Description Nenad Peric 2014-09-10 10:56:03 UTC
Description of problem:

When a thin pool is prevented from being activated, the creation fails (as expected) but a non-expected side effects happen. There are two abort messages, and a leftover of a linear 4 MB LV (a failed pool metadata LV creation attempt) is present on the system. 


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

lvm2-2.02.111-2.el6

How reproducible:

Everytime

Steps to Reproduce:
1. Edit volume_list in such a way that a new pool cannot be activated.
2. Create (or attempt to) a new thin pool:
lvcreate -T vg/thin_pool2 -L1G


Actual results:
Two "Aborting.." messages displayed:

[root@virt-147 ~]# lvcreate -T vg/thin_pool2 -L1G
  Volume "vg/thin_pool2" is not active locally.
  Aborting. Failed to wipe pool metadata thin_pool2.
  Aborting. Could not deactivate pool thin_pool2.

[root@virt-147 ~]# lvs -a
  LV                VG         Attr       LSize   Pool      Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data              vg         Vwi---tz--   1.00g thin_pool                                               
  [lvol0_pmspare]   vg         ewi-------   4.00m                                                         
  newpool           vg         -wi-------   4.00m                                                         
  other             vg         -wi-a-----   1.00g                                                         
  thin_pool         vg         twi---tz--   1.00g                                                         
  thin_pool2        vg         -wi-------   4.00m                                                         
  [thin_pool_tdata] vg         Twi-------   1.00g                                                         
  [thin_pool_tmeta] vg         ewi-------   4.00m                                                         
  lv_root           vg_virt147 -wi-ao----   6.71g                                                         
  lv_swap           vg_virt147 -wi-ao---- 816.00m                          



Pool creation fails and a linear LV is there with its name instead.

Expected results:

If a thin pool creation fails, or is not permitted by configuration any leftover devices should be removed, especially the ones which hold the name of a thin pool which was expected to be created in the first place. 

Additional info:

This may not be an isolated case to thin pools though, maybe other parts of LV creation are affected, but it is easiest to reproduce with thin pools.

Comment 2 Zdenek Kabelac 2014-09-10 11:19:28 UTC
Yep - Just needs another test for active device after activation - easy to fix in this particular place - it's just how many other cases needs the similar test

Comment 3 Zdenek Kabelac 2014-09-15 12:01:08 UTC
Fixed upstream:

https://www.redhat.com/archives/lvm-devel/2014-September/msg00074.html

Comment 6 Corey Marthaler 2015-04-27 21:26:15 UTC
Fix verified in the latest rpms.

2.6.32-554.el6.x86_64
lvm2-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
lvm2-libs-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
lvm2-cluster-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
udev-147-2.61.el6    BUILT: Mon Mar  2 05:08:11 CST 2015
device-mapper-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-libs-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-event-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-event-libs-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015



SCENARIO - [aborted_create_attempt]
Aborted thin pool creation check
Editing volume_list tag section
Making origin volume
lvcreate  --thinpool POOL  --zero n -L 1G snapper_thinp
  Volume "snapper_thinp/lvol0" is not active locally.
  Aborting. Failed to wipe start of new LV.
couldn't create thinpool
Check for left over devices...
Restoring default volume_list section

Comment 7 errata-xmlrpc 2015-07-22 07:35:28 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, 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://rhn.redhat.com/errata/RHBA-2015-1411.html


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