Bug 1468052 - unable to convert thin meta|data volume residing on a shared VG
unable to convert thin meta|data volume residing on a shared VG
Status: ON_QA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.4
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: David Teigland
cluster-qe@redhat.com
:
Depends On: 1296312
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-05 19:13 EDT by Corey Marthaler
Modified: 2017-12-06 06:39 EST (History)
9 users (show)

See Also:
Fixed In Version: lvm2-2.02.176-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1296312
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)
Comment 2 Corey Marthaler 2017-07-05 19:17:45 EDT
3.10.0-689.el7.x86_64

lvm2-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
lvm2-libs-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
lvm2-cluster-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-libs-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-event-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-event-libs-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 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-7.el7    BUILT: Thu Jun 22 08:35:15 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-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017



[root@host-114 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta% Devices
  [lvmlock]       global        -wi-ao---- 256.00m                          /dev/sdf1(0)
  POOL            snapper_thinp twi-aotz--   4.00g             0.00   1.86  POOL_tdata(0)
  [POOL_tdata]    snapper_thinp Twi-ao----   4.00g                          /dev/sdb1(65)
  [POOL_tmeta]    snapper_thinp ewi-ao----   4.00m                          /dev/sdd1(0)
  [lvmlock]       snapper_thinp -wi-ao---- 256.00m                          /dev/sdb1(0)
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                          /dev/sdb1(64)
  origin          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  other1          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  other2          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  other3          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  other4          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  other5          snapper_thinp Vwi-a-tz--   1.00g POOL        0.00
  pool_convert    snapper_thinp Vwi-a-tz--   1.00g POOL origin 0.00


[root@host-114 ~]#  lvconvert --yes --type mirror -m 1 snapper_thinp/POOL_tdata
  Lock on incorrect thin lv type snapper_thinp/POOL_tdata

### This should have been: 
  Mirror segment type cannot be used for thinpools.
Try "raid1" segment type instead.

[root@host-114 ~]#  lvconvert --yes --type raid1 -m 1 snapper_thinp/POOL_tdata
  Lock on incorrect thin lv type snapper_thinp/POOL_tdata
Comment 7 David Teigland 2017-10-10 11:50:49 EDT
This is a different issue than the one fixed in comment 3, and it appears that this already works.

# lvs gg
  LV     VG Attr       LSize  
  cpool0 gg Cwi---C--- 12.00m
  tpool0 gg twi---tz-- 12.00m

# lvconvert --type cache --cachepool gg/cpool0 gg/tpool0

Do you want wipe existing metadata of cache pool gg/cpool0? [y/n]: y
  WARNING: Cached thin pool's data cannot be currently resized and require manual uncache before resize!
  Logical volume gg/tpool0_tdata is now cached.

# lvs -a gg
  LV                   VG Attr       LSize   Pool     Origin               
  [cpool0]             gg Cwi---C---  12.00m                              
  [cpool0_cdata]       gg Cwi-------  12.00m                              
  [cpool0_cmeta]       gg ewi-------   8.00m                              
  [lvmlock]            gg -wi-ao---- 256.00m                              
  [lvol4_pmspare]      gg ewi-------   8.00m                              
  tpool0               gg twi---tz--  12.00m                              
  [tpool0_tdata]       gg Cwi---C---  12.00m [cpool0] [tpool0_tdata_corig]
  [tpool0_tdata_corig] gg owi---C---  12.00m                              
  [tpool0_tmeta]       gg ewi-------   4.00m
Comment 9 Corey Marthaler 2017-10-25 17:54:36 EDT
Looks like all cases/scenarios listed in this bug pass now with the exception of the _meta volumes.


3.10.0-755.el7.x86_64
lvm2-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
lvm2-libs-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
lvm2-cluster-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-libs-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-event-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-event-libs-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 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.175-3.el7    BUILT: Wed Oct 25 02:03:21 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.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017



 [root@host-040 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta% Devices
  POOL            snapper_thinp twi-aot---   4.00g             0.00   1.86  POOL_tdata(0)
  [POOL_tdata]    snapper_thinp Twi-ao----   4.00g                          /dev/sdf1(1)
  [POOL_tmeta]    snapper_thinp ewi-ao----   4.00m                          /dev/sdb1(0)
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                          /dev/sdf1(0)
  origin          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  other1          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  other2          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  other3          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  other4          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  other5          snapper_thinp Vwi-a-t---   1.00g POOL        0.00
  pool_convert    snapper_thinp Vwi-a-t---   1.00g POOL origin 0.00

[root@host-040 ~]# lvconvert --yes --type mirror -m 1 snapper_thinp/POOL
  Operation not permitted on LV snapper_thinp/POOL type thinpool.

[root@host-040 ~]# lvconvert --yes --type mirror -m 1 snapper_thinp/POOL_tdata
  Mirror segment type cannot be used for thinpools.
Try "raid1" segment type instead.
[root@host-040 ~]# lvconvert --yes --type raid1 -m 1 snapper_thinp/POOL_tdata
  Logical volume snapper_thinp/POOL_tdata successfully converted.

[root@host-040 ~]# lvconvert --yes --type mirror -m 1 snapper_thinp/POOL_tmeta
  Lock on incorrect thin lv type snapper_thinp/POOL_tmeta
[root@host-040 ~]# lvconvert --yes --type raid1 -m 1 snapper_thinp/POOL_tmeta
  Lock on incorrect thin lv type snapper_thinp/POOL_tmeta
Comment 10 David Teigland 2017-12-05 15:34:00 EST
fixed here
https://sourceware.org/git/?p=lvm2.git;a=commit;h=b910c34f09f45987fe56f0e90455a166e047144c

# lvconvert --type raid1 -m 1 cc/pool0_tmeta
Are you sure you want to convert linear LV cc/pool0_tmeta to raid1 with 2 images enhancing resilience? [y/n]: n
  Logical volume cc/pool0_tmeta NOT converted.

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