Bug 1133093 - no way to split off cache pool raid images
Summary: no way to split off cache pool raid images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Petr Rockai
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1119326
TreeView+ depends on / blocked
 
Reported: 2014-08-22 17:01 UTC by Corey Marthaler
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:
Cause: Strict check for LV names while using "lvconvert --repair" or "lvconvert --splitmirrors" command. Consequence: Inability to repair or split mirrors from cache data and cache metadata volumes. Fix: The check has been relaxed. Result: Repair and splitting mirrors from cache data and cache metadata volumes is now allowed.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:35:22 UTC


Attachments (Terms of Use)


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

Description Corey Marthaler 2014-08-22 17:01:43 UTC
Description of problem:
SCENARIO - [sequentially_split_off_all_stacked_cache_pool_raid1_images]
Create raid1 volume with many legs, convert to cache pool, and then sequentially split off each one of the PVs
host-081.virt.lab.msp.redhat.com: lvcreate -L 500M -n origin split_image /dev/sde1

host-081.virt.lab.msp.redhat.com: lvcreate --type raid1 -m 4 -n split_cache -L 500M split_image /dev/sdb1 /dev/sdc1 /dev/sdf1 /dev/sda1 /dev/sdg1
host-081.virt.lab.msp.redhat.com: lvcreate --type raid1 -m 4 -n split_cache_meta -L 8M split_image /dev/sdb1 /dev/sdc1 /dev/sdf1 /dev/sda1 /dev/sdg1
Waiting until all mirror|raid volumes become fully syncd...
   1/2 mirror(s) are fully synced: ( 78.64% 100.00% )
   2/2 mirror(s) are fully synced: ( 100.00% 100.00% )

Create cache pool volume by combining the cache data and cache metadata (fast) volumes
lvconvert --yes --type cache-pool --poolmetadata split_image/split_cache_meta split_image/split_cache
  WARNING: Converting logical volume split_image/split_cache and split_image/split_cache_meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Create cached volume by combining the cache pool (fast) and origin (slow) volumes
lvconvert --yes --type cache --cachepool split_image/split_cache split_image/origin


[root@host-081 ~]# lvs -a -o +devices
  LV                           Attr       LSize   Pool        OriginCpy%Sync Devices
  [lvol0_pmspare]              ewi-------   8.00m                            /dev/sdb1(129)
  origin                       Cwi-a-C--- 500.00m split_cache [origin_corig] origin_corig(0)
  [origin_corig]               -wi-ao---- 500.00m                            /dev/sde1(0)
  split_cache                  Cwi---C--- 500.00m                            split_cache_cdata(0)
  [split_cache_cdata]          Cwi-aor--- 500.00m                   100.00   split_cache_cdata_rimage_0(0),split_cache_cdata_rimage_1(0),split_cache_cdata_rimage_2(0),split_cache_cdata_rimage_3(0),split_cache_cdata_rimage_4(0)
  [split_cache_cdata_rimage_0] iwi-aor--- 500.00m                            /dev/sdb1(1)
  [split_cache_cdata_rimage_1] iwi-aor--- 500.00m                            /dev/sdc1(1)
  [split_cache_cdata_rimage_2] iwi-aor--- 500.00m                            /dev/sdf1(1)
  [split_cache_cdata_rimage_3] iwi-aor--- 500.00m                            /dev/sda1(1)
  [split_cache_cdata_rimage_4] iwi-aor--- 500.00m                            /dev/sdg1(1)
  [split_cache_cdata_rmeta_0]  ewi-aor---   4.00m                            /dev/sdb1(0)
  [split_cache_cdata_rmeta_1]  ewi-aor---   4.00m                            /dev/sdc1(0)
  [split_cache_cdata_rmeta_2]  ewi-aor---   4.00m                            /dev/sdf1(0)
  [split_cache_cdata_rmeta_3]  ewi-aor---   4.00m                            /dev/sda1(0)
  [split_cache_cdata_rmeta_4]  ewi-aor---   4.00m                            /dev/sdg1(0)
  [split_cache_cmeta]          ewi-aor---   8.00m                   100.00   split_cache_cmeta_rimage_0(0),split_cache_cmeta_rimage_1(0),split_cache_cmeta_rimage_2(0),split_cache_cmeta_rimage_3(0),split_cache_cmeta_rimage_4(0)
  [split_cache_cmeta_rimage_0] iwi-aor---   8.00m                            /dev/sdb1(127)
  [split_cache_cmeta_rimage_1] iwi-aor---   8.00m                            /dev/sdc1(127)
  [split_cache_cmeta_rimage_2] iwi-aor---   8.00m                            /dev/sdf1(127)
  [split_cache_cmeta_rimage_3] iwi-aor---   8.00m                            /dev/sda1(127)
  [split_cache_cmeta_rimage_4] iwi-aor---   8.00m                            /dev/sdg1(127)
  [split_cache_cmeta_rmeta_0]  ewi-aor---   4.00m                            /dev/sdb1(126)
  [split_cache_cmeta_rmeta_1]  ewi-aor---   4.00m                            /dev/sdc1(126)
  [split_cache_cmeta_rmeta_2]  ewi-aor---   4.00m                            /dev/sdf1(126)
  [split_cache_cmeta_rmeta_3]  ewi-aor---   4.00m                            /dev/sda1(126)
  [split_cache_cmeta_rmeta_4]  ewi-aor---   4.00m                            /dev/sdg1(126)


[root@host-081 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata_rimage_1
  Names including "_cdata" are reserved. Please choose a different LV name.
  Run `lvconvert --help' for more information.
[root@host-081 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata
  Names including "_cdata" are reserved. Please choose a different LV name.
  Run `lvconvert --help' for more information.
[root@host-081 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata_rimage_1 /dev/sdc1
  Names including "_cdata" are reserved. Please choose a different LV name.
  Run `lvconvert --help' for more information.
[root@host-081 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata /dev/sdc1
  Names including "_cdata" are reserved. Please choose a different LV name.
  Run `lvconvert --help' for more information.


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

lvm2-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-libs-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-cluster-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014

Comment 2 Petr Rockai 2014-10-07 07:01:15 UTC
I have relaxed the check on LV name restrictions for both --repair and (relevant in this bug) --splitmirror. The LV to split can be a special (i.e. _cdata, _cmeta and so on), as long as the --name given is a regular name. The fix is upstream in b66f16fd63014c958d65ab37df4b72f1566176d3.

Comment 4 Nenad Peric 2015-04-23 13:11:41 UTC
[root@tardis-02 ~]# lvcreate -L 500M -n origin split_image /dev/sde1
  Logical volume "origin" created.
[root@tardis-02 ~]# lvcreate --type raid1 -m 4 -n split_cache -L 500M split_image /dev/sdb1 /dev/sdc1 /dev/sdf1 /dev/sda1 /dev/sdg1
  Physical Volume "/dev/sda1" not found in Volume Group "split_image".
[root@tardis-02 ~]# lvcreate --type raid1 -m 4 -n split_cache -L 500M split_image /dev/sdb1 /dev/sdc1 /dev/sdf1 /dev/sdd1 /dev/sdg1
  Logical volume "split_cache" created.
[root@tardis-02 ~]# lvcreate --type raid1 -m 4 -n split_cache_meta -L 8M split_image /dev/sdb1 /dev/sdc1 /dev/sdf1 /dev/sdd1 /dev/sdg1
  Logical volume "split_cache_meta" created.
[root@tardis-02 ~]# lvconvert --yes --type cache-pool --poolmetadata split_image/split_cache_meta split_image/split_cache
  WARNING: Converting logical volume split_image/split_cache and split_image/split_cache_meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted split_image/split_cache to cache pool.
[root@tardis-02 ~]# lvconvert --yes --type cache --cachepool split_image/split_cache split_image/origin
  Logical volume split_image/origin is now cached.

[root@tardis-02 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata_rimage_1
  Unable to reduce images by specified amount - only 1 in split_cache_cdata_rimage_1

[root@tardis-02 ~]# lvconvert --yes --splitmirrors 1 --name new0 split_image/split_cache_cdata

[root@tardis-02 ~]# lvconvert --yes --splitmirrors 1 --name new1 split_image/split_cache_cdata /dev/sdf1
[root@tardis-02 ~]# lvs
  LV      VG          Attr       LSize   Pool          Origin         Data%  Meta%  Move Log Cpy%Sync Convert
  new0    split_image -wi-a----- 500.00m                                                                     
  new1    split_image -wi-a----- 500.00m                                                                     
  origin  split_image Cwi-a-C--- 500.00m [split_cache] [origin_corig] 0.06   1.56            0.00            
  lv_home vg_tardis02 -wi-ao---- 224.88g                                                                     
  lv_root vg_tardis02 -wi-ao----  50.00g                                                                     
  lv_swap vg_tardis02 -wi-ao----   4.00g        



Additionally ran 2 iterations of the above mentioned scenario. 


Marking as VERIFIED with lvm2-2.02.118-2.el6.x86_64

Comment 5 errata-xmlrpc 2015-07-22 07:35:22 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.