Bug 1251283 - unable to rename thin pool with data volume stacked on top of cache volume
unable to rename thin pool with data volume stacked on top of cache volume
Status: VERIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Zdenek Kabelac
cluster-qe@redhat.com
:
Depends On: 1233954
Blocks: 1469559
  Show dependency treegraph
 
Reported: 2015-08-06 17:58 EDT by Corey Marthaler
Modified: 2017-10-16 08:01 EDT (History)
12 users (show)

See Also:
Fixed In Version: lvm2-2.02.175-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1233954
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2015-08-06 17:58:36 EDT
+++ This bug was initially created as a clone of Bug #1233954 +++

Description of problem:

[root@host-119 ~]# lvcreate  --profile thin-performance --zero y -L 4G -n pool_A snapper_thinp /dev/sda1
  Logical volume "pool_A" created.
[root@host-119 ~]# lvcreate  -L 4G -n cpool snapper_thinp /dev/sdb1
  Logical volume "cpool" created.
[root@host-119 ~]# lvcreate  -L 12M -n cpool_meta snapper_thinp /dev/sdb1
  Logical volume "cpool_meta" created.
[root@host-119 ~]# lvconvert --yes --type cache-pool --poolmetadata snapper_thinp/cpool_meta snapper_thinp/cpool
  WARNING: Converting logical volume snapper_thinp/cpool and snapper_thinp/cpool_meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted snapper_thinp/cpool to cache pool.
[root@host-119 ~]# lvconvert --yes --type cache --cachepool snapper_thinp/cpool snapper_thinp/pool_A
  Logical volume snapper_thinp/pool_A is now cached.


[root@host-119 ~]# lvcreate  --profile thin-performance --zero y -L 4M -n meta snapper_thinp /dev/sda1
  Logical volume "meta" created.
[root@host-119 ~]# lvconvert --thinpool snapper_thinp/pool_A --poolmetadata meta --yes
  WARNING: Converting logical volume snapper_thinp/pool_A and snapper_thinp/meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted snapper_thinp/pool_A to thin pool.


[root@host-119 ~]# lvs -a -o +devices
  LV                   VG            Attr       LSize   Pool    Origin               Data%  Meta%  Move Log Cpy%Sync Convert Devices
  [cpool]              snapper_thinp Cwi---C---   4.00g                              0.01   6.58            0.00             cpool_cdata(0)       
  [cpool_cdata]        snapper_thinp Cwi-ao----   4.00g                                                                      /dev/sdb1(0)
  [cpool_cmeta]        snapper_thinp ewi-ao----  12.00m                                                                      /dev/sdb1(1024)
  [lvol0_pmspare]      snapper_thinp ewi-------  12.00m                                                                      /dev/sde1(0)
  pool_A               snapper_thinp twi-a-tz--   4.00g                              0.00   1.27                             pool_A_tdata(0)      
  [pool_A_tdata]       snapper_thinp Cwi-aoC---   4.00g [cpool] [pool_A_tdata_corig] 0.01   6.58            0.00             pool_A_tdata_corig(0)
  [pool_A_tdata_corig] snapper_thinp owi-aoC---   4.00g                                                                      /dev/sda1(0)
  [pool_A_tmeta]       snapper_thinp ewi-ao----   4.00m                                                                      /dev/sda1(1024)


[root@host-119 ~]# lvrename snapper_thinp/pool_A snapper_thinp/pool_B
  Cannot rename "pool_A": name format not recognized for internal LV "cpool"


Version-Release number of selected component (if applicable):
2.6.32-563.el6.x86_64

lvm2-2.02.118-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
lvm2-libs-2.02.118-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
lvm2-cluster-2.02.118-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
udev-147-2.62.el6    BUILT: Thu Apr 23 05:44:37 CDT 2015
device-mapper-1.02.95-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
device-mapper-libs-1.02.95-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
device-mapper-event-1.02.95-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
device-mapper-event-libs-1.02.95-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.118-3.el6    BUILT: Wed Jun 17 09:40:21 CDT 2015
Comment 1 Corey Marthaler 2015-08-06 17:59:42 EDT
Cloning for rhel7...

[root@harding-03 ~]# lvrename /dev/snapper_thinp/POOLA /dev/snapper_thinp/POOLB
  Cannot rename "POOLA": name format not recognized for internal LV "cpool"

3.10.0-302.el7.x86_64
lvm2-2.02.126-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
lvm2-libs-2.02.126-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
lvm2-cluster-2.02.126-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
device-mapper-1.02.103-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
device-mapper-libs-1.02.103-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
device-mapper-event-1.02.103-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
device-mapper-event-libs-1.02.103-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
device-mapper-persistent-data-0.5.4-1.el7    BUILT: Fri Jul 17 08:56:22 CDT 2015
cmirror-2.02.126-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.126-1.el7    BUILT: Tue Jul 28 11:32:33 CDT 2015
Comment 4 Jonathan Earl Brassow 2017-07-26 13:33:04 EDT
This seems to be fixed upstream (not sure of the exact commit).  I'll put this bug in POST - at a minimum it will be fixed in the next rebuild.

[root@bp-01 ~]# !lvs
lvs -o name,segtype,attr,raidsyncaction,syncpercent,devices -a vg
  WARNING: Not using lvmetad because a repair command was run.
  LV                Type       Attr       SyncAction Cpy%Sync Devices
  [cachepool]       cache-pool Cwi---C---            0.00     cachepool_cdata(0)
  [cachepool_cdata] linear     Cwi-ao----                     /dev/sdb1(1284)
  [cachepool_cmeta] linear     ewi-ao----                     /dev/sdb1(1282)
  lv                thin-pool  twi-aotz--                     lv_tdata(0)
  [lv_tdata]        cache      Cwi-aoC---            0.00     lv_tdata_corig(0)
  [lv_tdata_corig]  linear     owi-aoC---                     /dev/sdb1(0)
  [lv_tmeta]        linear     ewi-ao----                     /dev/sdb1(1409)
  [lvol0_pmspare]   linear     ewi-------                     /dev/sdb1(1280)
  thinLV            thin       Vwi-a-tz--
[root@bp-01 ~]# lvrename vg/lv thinpool
  WARNING: Not using lvmetad because a repair command was run.
  Renamed "lv" to "thinpool" in volume group "vg"
[root@bp-01 ~]# lvs -o name,segtype,attr,raidsyncaction,syncpercent,devices -a vg
  WARNING: Not using lvmetad because a repair command was run.
  LV                     Type       Attr       SyncAction Cpy%Sync Devices
  [cachepool]            cache-pool Cwi---C---            0.00     cachepool_cdata(0)
  [cachepool_cdata]      linear     Cwi-ao----                     /dev/sdb1(1284)
  [cachepool_cmeta]      linear     ewi-ao----                     /dev/sdb1(1282)
  [lvol0_pmspare]        linear     ewi-------                     /dev/sdb1(1280)
  thinLV                 thin       Vwi-a-tz--
  thinpool               thin-pool  twi-aotz--                     thinpool_tdata(0)
  [thinpool_tdata]       cache      Cwi-aoC---            0.00     thinpool_tdata_corig(0)
  [thinpool_tdata_corig] linear     owi-aoC---                     /dev/sdb1(0)
  [thinpool_tmeta]       linear     ewi-ao----                     /dev/sdb1(1409)
Comment 8 Roman Bednář 2017-10-16 08:01:11 EDT
Marking verified using latest rpms.

# lvcreate -L 100M -n lv --type thin-pool 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.
  Logical volume "lv" created.

# lvcreate  -L 100M -n cpool --type cache-pool vg
  Using default stripesize 64.00 KiB.
  Logical volume "cpool" created.

# lvconvert --yes --type cache --cachepool vg/cpool vg/lv
  WARNING: Cached thin pool's data cannot be currently resized and require manual uncache before resize!
  Logical volume vg/lv_tdata is now cached.

# lvcreate -n thin_lv -V100M --type thin vg/lv
  Using default stripesize 64.00 KiB.
  Logical volume "thin_lv" created.

# lvs -o name,segtype,attr,raidsyncaction,syncpercent,devices -a vg
  LV               Type       Attr       SyncAction Cpy%Sync Devices          
  [cpool]          cache-pool Cwi---C---            0.00     cpool_cdata(0)   
  [cpool_cdata]    linear     Cwi-ao----                     /dev/sda1(29)    
  [cpool_cmeta]    linear     ewi-ao----                     /dev/sda1(27)    
  lv               thin-pool  twi-aotz--                     lv_tdata(0)      
  [lv_tdata]       cache      Cwi-aoC---            0.00     lv_tdata_corig(0)
  [lv_tdata_corig] linear     owi-aoC---                     /dev/sda1(1)     
  [lv_tmeta]       linear     ewi-ao----                     /dev/sdj1(0)     
  [lvol0_pmspare]  linear     ewi-------                     /dev/sda1(0)     
  [lvol0_pmspare]  linear     ewi-------                     /dev/sda1(26)    
  thin_lv          thin       Vwi-a-tz--                                      

# lvrename -y vg/lv thinpool
  Renamed "lv" to "thinpool" in volume group "vg"


3.10.0-727.el7.x86_64

lvm2-2.02.175-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
lvm2-libs-2.02.175-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
lvm2-cluster-2.02.175-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
device-mapper-1.02.144-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
device-mapper-libs-1.02.144-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
device-mapper-event-1.02.144-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
device-mapper-event-libs-1.02.144-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017
device-mapper-persistent-data-0.7.3-2.el7    BUILT: Tue Oct 10 11:00:07 CEST 2017
cmirror-2.02.175-2.el7    BUILT: Fri Oct 13 13:31:22 CEST 2017

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