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 1491463 - unsupported lvmlockd cache-pool lvcreate attempt shouldn't leave behind aux LV
Summary: unsupported lvmlockd cache-pool lvcreate attempt shouldn't leave behind aux LV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-13 23:01 UTC by Corey Marthaler
Modified: 2021-09-03 12:36 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.175-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 0 None None None 2018-04-10 15:23:07 UTC

Description Corey Marthaler 2017-09-13 23:01:33 UTC
Description of problem:

# Normal non lockd behavior

[root@host-117 ~]# lvcreate -ay --type cache-pool -n cpool -L 500M VG
  Using default stripesize 64.00 KiB.
  Logical volume "cpool" created.

[root@host-117 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  cpool           VG            Cwi---C--- 500.00m                                                     cpool_cdata(0)
  [cpool_cdata]   VG            Cwi------- 500.00m                                                     /dev/sda1(4)  
  [cpool_cmeta]   VG            ewi-------   8.00m                                                     /dev/sda1(2)  
  [lvol0_pmspare] VG            ewi-------   8.00m                                                     /dev/sda1(0)  


 
# From man page:
 limitations of lockd VGs
     Things that do not yet work in lockd VGs:
     · using lvcreate to create cache pools or cache LVs (use lvconvert)


# DLM + LVMLOCKD 
[root@host-113 ~]# vgs pv_shuffle_A
  VG           #PV #LV #SN Attr   VSize   VFree  
  pv_shuffle_A   6   0   0 wz--ns <49.98g <49.98g
[root@host-113 ~]# lvcreate -ay --type cache-pool -n cpool -L 500M pv_shuffle_A
  Using default stripesize 64.00 KiB.
  Use lvconvert for cache with lock type dlm
[root@host-113 ~]# echo $?
5
[root@host-113 ~]# lvs -a -o +devices
  LV    VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  lvol0 pv_shuffle_A  -wi-------   8.00m                                                     /dev/sda3(0)  


# SANLOCK + LVMLOCKD
[root@host-042 ~]# lvcreate -ay --type cache-pool -n cpool -L 500M pv_shuffle_A
  Using default stripesize 64.00 KiB.
  Use lvconvert for cache with lock type sanlock
[root@host-042 ~]# lvs -a -o +devices
  LV        VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  [lvmlock] global        -wi-ao---- 256.00m                                                     /dev/sdc3(0)  
  [lvmlock] pv_shuffle_A  -wi-ao---- 256.00m                                                     /dev/sdc2(0)  
  lvol0     pv_shuffle_A  -wi-------   8.00m                                                     /dev/sdc2(64) 


Version-Release number of selected component (if applicable):
3.10.0-693.2.1.el7.x86_64

lvm2-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
lvm2-libs-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
lvm2-cluster-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-libs-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-event-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-event-libs-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017
cmirror-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
sanlock-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017
sanlock-lib-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017
lvm2-lockd-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017

Comment 2 Corey Marthaler 2017-09-13 23:10:15 UTC
FWIW, cache attempt alone doesn't not leave behind an auxiliary volume, only cache-pool.

 [root@host-042 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize    Devices       
  cpool           pv_shuffle_A  Cwi---C--- 100.00m  cpool_cdata(0)
  [cpool_cdata]   pv_shuffle_A  Cwi------- 100.00m  /dev/sdc2(64) 
  [cpool_cmeta]   pv_shuffle_A  ewi-------   8.00m  /dev/sdc2(89) 
  [lvmlock]       pv_shuffle_A  -wi-ao---- 256.00m  /dev/sdc2(0)  
  [lvol0_pmspare] pv_shuffle_A  ewi-------   8.00m  /dev/sdc2(91) 

[root@host-042 ~]# lvcreate --type cache -n corigin --cachepool pv_shuffle_A/cpool -L 100M
  Using default stripesize 64.00 KiB.
  Use lvconvert for cache with lock type sanlock

[root@host-042 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize    Devices       
  cpool           pv_shuffle_A  Cwi---C--- 100.00m  cpool_cdata(0)
  [cpool_cdata]   pv_shuffle_A  Cwi------- 100.00m  /dev/sdc2(64) 
  [cpool_cmeta]   pv_shuffle_A  ewi-------   8.00m  /dev/sdc2(89) 
  [lvmlock]       pv_shuffle_A  -wi-ao---- 256.00m  /dev/sdc2(0)  
  [lvol0_pmspare] pv_shuffle_A  ewi-------   8.00m  /dev/sdc2(91)

Comment 3 Corey Marthaler 2017-09-14 15:22:55 UTC
Similar wrt to thinpool+thinvirt in one cmd

   limitations of lockd VGs
       Things that do not yet work in lockd VGs:
       · creating a new thin pool and a new thin LV in a single command

# Should the pool get created here or should nothing be created?

[root@host-034 ~]# lvcreate -aye --thinpool POOL1 -L 100M --virtualsize 100M -n thin VG
  Using default stripesize 64.00 KiB.
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  Create thin pool and thin LV separately with lock type dlm
[root@host-034 ~]# echo $?
5

[root@host-034 ~]# lvs -a -o +devices
  LV              VG  Attr       LSize    Devices       
  POOL1           VG  twi---tz-- 100.00m  POOL1_tdata(0)
  [POOL1_tdata]   VG  Twi------- 100.00m  /dev/sda1(51) 
  [POOL1_tmeta]   VG  ewi-------   4.00m  /dev/sdh1(0)  
  [lvol0_pmspare] VG  ewi-------   4.00m  /dev/sda1(50)

Comment 7 Corey Marthaler 2017-11-20 22:00:03 UTC
Fix verified in the latest rpms.

3.10.0-790.el7.x86_64
lvm2-2.02.176-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
lvm2-libs-2.02.176-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
lvm2-cluster-2.02.176-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
lvm2-lockd-2.02.176-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
lvm2-python-boom-0.8-4.el7    BUILT: Wed Nov 15 04:23:09 CST 2017
cmirror-2.02.176-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
device-mapper-1.02.145-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
device-mapper-libs-1.02.145-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
device-mapper-event-1.02.145-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
device-mapper-event-libs-1.02.145-4.el7    BUILT: Wed Nov 15 04:21:19 CST 2017
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017
sanlock-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017
sanlock-lib-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017



SCENARIO - [existing_origin]
Create an existing origin volume with out a cache pool, and then convert it to a cache volume in one command

*** Cache info for this scenario ***
*  origin (slow):  /dev/sdg1
*  pool (fast):    /dev/sdh1
************************************

Adding "slow" and "fast" tags to corresponding pvs
Create origin (slow) volume
lvcreate --wipesignatures y --activate ey -L 4G -n corigin cache_sanity @slow

Create a cache volume from this existing origin volume with just one lvcreate command
lvcreate --activate ey --type cache -n existing_origin -L 2G cache_sanity/corigin /dev/sdh1
  Use lvconvert to create thin pools and cache pools in a shared VG.



SCENARIO - [thin_create_options]
Attempt to run through all the -T, --thin, and --thinpool flag options

[...]
4. Creation of thin pool and virtual thin volume on one cmd line:
lvcreate --activate ey --thinpool POOL1 -L 100M --virtualsize 100M snapper_thinp
  Use lvconvert to create thin pools and cache pools in a shared VG.
lvcreate --activate ey --thinpool POOL4 -L 100M -V 100M snapper_thinp
  Use lvconvert to create thin pools and cache pools in a shared VG.

Comment 10 errata-xmlrpc 2018-04-10 15:22:16 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://access.redhat.com/errata/RHEA-2018:0853

Comment 11 Corey Marthaler 2018-07-02 19:48:30 UTC
Quick note that these one cmd thin/cache creates have now been enabled in 7.6.

3.10.0-915.el7.x86_64
lvm2-2.02.179-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
lvm2-libs-2.02.179-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
lvm2-cluster-2.02.179-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
lvm2-lockd-2.02.179-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
lvm2-python-boom-0.9-3.el7    BUILT: Tue Jun 26 08:43:24 CDT 2018
cmirror-2.02.179-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
device-mapper-1.02.148-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
device-mapper-libs-1.02.148-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
device-mapper-event-1.02.148-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
device-mapper-event-libs-1.02.148-4.el7    BUILT: Tue Jun 26 08:35:45 CDT 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017


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