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 1102949 - RFE: allow pvs in cache volumes to be vgsplit off
Summary: RFE: allow pvs in cache volumes to be vgsplit off
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1119326 1186924
TreeView+ depends on / blocked
 
Reported: 2014-05-29 21:35 UTC by Corey Marthaler
Modified: 2021-09-03 12:53 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.185-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:10:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2253 0 None None None 2019-08-06 13:11:12 UTC

Description Corey Marthaler 2014-05-29 21:35:10 UTC
Description of problem:
[root@harding-03 ~]# pvscan
  PV /dev/sdc2   VG cache_sanity      lvm2 [46.57 GiB / 44.55 GiB free]
  PV /dev/sdc1   VG cache_sanity      lvm2 [46.58 GiB / 46.58 GiB free]
  PV /dev/sdb2   VG cache_sanity      lvm2 [46.57 GiB / 46.57 GiB free]
  PV /dev/sdb1   VG cache_sanity      lvm2 [46.58 GiB / 42.58 GiB free]

[root@harding-03 ~]# lvs -a -o +devices
  LV                    VG            Attr       LSize  Pool          Origin          Devices
  corigin               cache_sanity  Cwi---C---  4.00g display_cache [corigin_corig] corigin_corig(0)
  [corigin_corig]       cache_sanity  -wi-------  4.00g                               /dev/sdb1(0)
  display_cache         cache_sanity  Cwi---C---  2.00g                               display_cache_cdata(0)
  [display_cache_cdata] cache_sanity  Cwi---C---  2.00g                               /dev/sdc2(0)
  [display_cache_cmeta] cache_sanity  ewi---C---  8.00m                               /dev/sdc2(512)
  [lvol0_pmspare]       cache_sanity  ewi-------  8.00m                               /dev/sdc2(514)

[root@harding-03 ~]# vgsplit cache_sanity cache_sanity_new /dev/sdc2 /dev/sdb1
  Unable to split VG while it contains cache LVs



Version-Release number of selected component (if applicable):
3.10.0-110.el7.x86_64
lvm2-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-libs-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-cluster-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-libs-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-libs-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-persistent-data-0.2.8-4.el7    BUILT: Fri Jan 24 14:28:55 CST 2014
cmirror-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014

Comment 5 Zdenek Kabelac 2019-04-16 14:14:49 UTC
Supported with stable-2.02 branch patch:

https://www.redhat.com/archives/lvm-devel/2019-April/msg00061.html

Comment 9 Corey Marthaler 2019-05-14 20:51:53 UTC
Verified in the latest rpms.

3.10.0-1046.el7.x86_64

lvm2-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-libs-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-cluster-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-lockd-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-python-boom-0.9-17.el7.2    BUILT: Mon May 13 04:37:00 CDT 2019
cmirror-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-libs-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-event-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-event-libs-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-persistent-data-0.8.1-1.el7    BUILT: Sat May  4 14:53:53 CDT 2019



[root@hayes-03 ~]# pvscan
  PV /dev/sdb1   VG seven           lvm2 [446.62 GiB / 446.62 GiB free]
  PV /dev/sdc1   VG seven           lvm2 [446.62 GiB / 446.62 GiB free]
  PV /dev/sdd1   VG seven           lvm2 [446.62 GiB / 446.62 GiB free]
  PV /dev/sde1   VG seven           lvm2 [446.62 GiB / 446.62 GiB free]
  PV /dev/sdf1   VG seven           lvm2 [<1.82 TiB / <1.82 TiB free]
  PV /dev/sdi1   VG seven           lvm2 [<1.82 TiB / <1.82 TiB free]
  Total: 6 [5.38 TiB] / in use: 6 [5.38 TiB] / in no VG: 0 [0   ]

[root@hayes-03 ~]# lvcreate -L 1G -n origin seven /dev/sde1
  Logical volume "origin" created.
[root@hayes-03 ~]# lvcreate -L 200M -n cache seven /dev/sdi1
  Logical volume "cache" created.
[root@hayes-03 ~]# lvcreate -L 8M -n cache_meta seven /dev/sdi1
  Logical volume "cache_meta" created.
[root@hayes-03 ~]# lvconvert --yes --type cache-pool --poolmetadata seven/cache_meta seven/cache
  WARNING: Converting seven/cache and seven/cache_meta to cache pool's data and metadata volumes with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted seven/cache and seven/cache_meta to cache pool.
[root@hayes-03 ~]# lvconvert --yes --type cache --cachepool seven/cache seven/origin
  Logical volume seven/origin is now cached.

[root@hayes-03 ~]# lvs -a -o +devices
  Unknown feature in status: 8 18/2048 128 9/3200 0 49 0 0 0 9 0 3 metadata2 writethrough no_discard_passdown 2 migration_threshold 2048 smq 0 rw - 
  Unknown feature in status: 8 18/2048 128 9/3200 0 49 0 0 0 9 0 3 metadata2 writethrough no_discard_passdown 2 migration_threshold 2048 smq 0 rw - 
  LV              VG    Attr       LSize   Pool    Origin         Data%  Meta%  Move Log Cpy%Sync Convert Devices        
  [cache]         seven Cwi---C--- 200.00m                        0.28   0.88            0.00             cache_cdata(0) 
  [cache_cdata]   seven Cwi-ao---- 200.00m                                                                /dev/sdi1(0)   
  [cache_cmeta]   seven ewi-ao----   8.00m                                                                /dev/sdi1(50)  
  [lvol0_pmspare] seven ewi-------   8.00m                                                                /dev/sdb1(0)   
  origin          seven Cwi-a-C---   1.00g [cache] [origin_corig] 0.28   0.88            0.00             origin_corig(0)
  [origin_corig]  seven owi-aoC---   1.00g                                                                /dev/sde1(0)   


# Verify that a cache PVs can't be split off w/o being deactivated first
[root@hayes-03 ~]# vgsplit seven ten /dev/sde1 /dev/sdi1
  Logical volume seven/cache_cdata (part of cache) must be inactive.

[root@hayes-03 ~]# vgchange -an seven
  0 logical volume(s) in volume group "seven" now active

# Verify that just a single cache PV can't be split w/o the other
[root@hayes-03 ~]# vgsplit seven ten /dev/sde1 
  Cannot split cache origin ten/origin_corig and its cache pool data seven/cache_cdata into separate VGs.

# Verify cache pool and origin PVs can be split now
[root@hayes-03 ~]# vgsplit seven ten /dev/sde1 /dev/sdi1
  New volume group "ten" successfully split from "seven"

[root@hayes-03 ~]# lvs -a -o +devices
  LV              VG    Attr       LSize   Pool    Origin         Data%  Meta%  Move Log Cpy%Sync Convert Devices        
  [lvol0_pmspare] seven ewi-------   8.00m                                                                /dev/sdb1(0)   
  [cache]         ten   Cwi---C--- 200.00m                                                                cache_cdata(0) 
  [cache_cdata]   ten   Cwi------- 200.00m                                                                /dev/sdi1(0)   
  [cache_cmeta]   ten   ewi-------   8.00m                                                                /dev/sdi1(50)  
  origin          ten   Cwi---C---   1.00g [cache] [origin_corig]                                         origin_corig(0)
  [origin_corig]  ten   owi---C---   1.00g                                                                /dev/sde1(0)

Comment 10 Corey Marthaler 2019-05-14 21:02:31 UTC
FYI - a side effect of this is bug 1710096.

Comment 12 errata-xmlrpc 2019-08-06 13:10:41 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/RHBA-2019:2253


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