Bug 1380778 - lvconvert prevents thinpool conversion to other type than cache
Summary: lvconvert prevents thinpool conversion to other type than cache
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-30 14:15 UTC by Roman Bednář
Modified: 2021-09-03 12:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-04 13:03:08 UTC
Target Upstream Version:


Attachments (Terms of Use)
log (47.75 KB, text/plain)
2016-09-30 14:15 UTC, Roman Bednář
no flags Details

Description Roman Bednář 2016-09-30 14:15:24 UTC
Created attachment 1206296 [details]
log

Conversion of thin pool to anything except cached pool seems disabled while it should work. 
Tried with --type mirror conversion and --type raid.
We've been using this test up until now without issues. Conversion to cached LV works fine.
Was this an intended change?


Attaching lvconvert -vvvv log. 

========================================================
SCENARIO - [pool_to_conversion]
Attempt to convert a thinp pool device to mirror, raid1, raid4, raid5, and raid6
Making pool volume
lvcreate --activate ey --thinpool POOL -L 4G  --zero n --poolmetadatasize 4M snapper_thinp

Sanity checking pool device (POOL) metadata
examining superblock
examining devices tree
examining mapping tree
checking space map counts


Making origin volume
lvcreate --activate ey --virtualsize 1G -T snapper_thinp/POOL -n origin
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other1
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other2
lvcreate --activate ey --virtualsize 1G -T snapper_thinp/POOL -n other3
lvcreate --activate ey --virtualsize 1G -T snapper_thinp/POOL -n other4
  WARNING: Sum of all thin volume sizes (5.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (4.00 GiB)!
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other5
  WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (4.00 GiB)!
Making snapshot of origin volume
lvcreate --activate ey -k n -s /dev/snapper_thinp/origin -n pool_convert


Attempt mirror conversion of pool device...
lvconvert --type mirror -m 1 snapper_thinp/POOL
  Operation not permitted on thin pool LV snapper_thinp/POOL.
  Operations permitted on a thin pool LV are:
  --splitcache  (operates on cache sub LV)
  --uncache     (operates on cache sub LV)
  --type cache  (operates on data sub LV)
  --repair

========================================================
# lvs -a
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root            rhel_host-004 -wi-ao----   6.67g                                                    
  swap            rhel_host-004 -wi-ao---- 820.00m                                                    
  POOL            snapper_thinp twi---t---   4.00g                                                    
  [POOL_tdata]    snapper_thinp Twi-------   4.00g                                                    
  [POOL_tmeta]    snapper_thinp ewi-------   4.00m                                                    
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                                                    
  origin          snapper_thinp Vwi---t---   1.00g POOL                                               
  other1          snapper_thinp Vwi---t---   1.00g POOL                                               
  other2          snapper_thinp Vwi---t---   1.00g POOL                                               
  other3          snapper_thinp Vwi---t---   1.00g POOL                                               
  other4          snapper_thinp Vwi---t---   1.00g POOL                                               
  other5          snapper_thinp Vwi---t---   1.00g POOL                                               
  pool_convert    snapper_thinp Vwi---t---   1.00g POOL origin

Comment 1 Roman Bednář 2016-09-30 16:12:21 UTC
3.10.0-511.el7.x86_64

lvm2-2.02.166-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
lvm2-libs-2.02.166-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
lvm2-cluster-2.02.166-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
device-mapper-1.02.135-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
device-mapper-libs-1.02.135-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
device-mapper-event-1.02.135-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
device-mapper-event-libs-1.02.135-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016
cmirror-2.02.166-1.el7    BUILT: Wed Sep 28 02:26:52 CDT 2016

Comment 3 Zdenek Kabelac 2017-01-04 13:03:08 UTC
We do not support  --type mirror  for anything  pool related.

There was likely short period of time in upstream where 'mirror' was allowed to be used for _tdata & _tmeta but was decided to be not supported.

So the only supported  mirroring of pool data & metadata devices is via --type raidX.

And also you need to explicitly specify  _tdata or _tmeta  device.

(While with caching we only support caching of _tdata)


Side note - there used to be a better message (got lost over the time somehow):

  For pool data volume conversion use "vg/pool_tdata".
  For pool metadata volume conversion use "vg/pool_tmeta".


Maybe I'll check if there is a way to 'revive' it  - but the end result will be unsupported conversion, so closing this one.


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