Bug 244795

Summary: vgsplit needs to check if all pvs being split out have metadata space
Product: Red Hat Enterprise Linux 5 Reporter: Milan Broz <mbroz>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: agk, dwysocha, jbrassow, mbroz, prockai, pvrabec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0516 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 16:49:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Broz 2007-06-19 08:36:42 UTC
+++ This bug was initially created as a clone of Bug #202885 +++
RHEL5 clone

Description of problem:
Otherwise the new volume group could become inconsistent.

[root@taft-04 ~]# pvcreate --metadatacopies 0 /dev/sdb2 /dev/sdc2 /dev/sdd2
  Physical volume "/dev/sdb2" successfully created
  Physical volume "/dev/sdc2" successfully created
  Physical volume "/dev/sdd2" successfully created
[root@taft-04 ~]# pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdd1" successfully created
[root@taft-04 ~]# pvscan
  PV /dev/sdb1         lvm2 [136.23 GB]
  PV /dev/sdb2         lvm2 [136.23 GB]
  PV /dev/sdc1         lvm2 [136.23 GB]
  PV /dev/sdc2         lvm2 [136.23 GB]
  PV /dev/sdd1         lvm2 [930.89 GB]
  PV /dev/sdd2         lvm2 [930.89 GB]
  Total: 6 [2.35 TB] / in use: 0 [0   ] / in no VG: 6 [2.35 TB]
[root@taft-04 ~]# vgcreate foo /dev/sdb1 /dev/sdb2 /dev/sdc1 /dev/sdc2 /dev/sdd1
/dev/sdd2
  Volume group "foo" successfully created
[root@taft-04 ~]# vgsplit foo bar /dev/sdb2 /dev/sdc2 /dev/sdd2
  Volume group "bar" became inconsistent: please fix manually
[root@taft-04 ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "foo" using metadata type lvm2
[root@taft-04 ~]# pvscan
  PV /dev/sdb1   VG foo   lvm2 [136.23 GB / 136.23 GB free]
  PV /dev/sdc1   VG foo   lvm2 [136.23 GB / 136.23 GB free]
  PV /dev/sdd1   VG foo   lvm2 [930.89 GB / 930.89 GB free]
  PV /dev/sdb2            lvm2 [136.23 GB]
  PV /dev/sdc2            lvm2 [136.23 GB]
  PV /dev/sdd2            lvm2 [930.89 GB]
  Total: 6 [2.35 TB] / in use: 3 [1.18 TB] / in no VG: 3 [1.18 TB]


Version-Release number of selected component (if applicable):
[root@taft-04 ~]# rpm -q lvm2
lvm2-2.02.06-6.0.RHEL4

-- Additional comment from mbroz on 2007-03-23 08:53 EST --
Fixed upstream in lvm2 2.02.25, waiting for pkg rebase -> POST.

Comment 1 RHEL Program Management 2007-06-19 08:44:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Corey Marthaler 2007-06-27 22:32:48 UTC
fix verified in lvm2-2.02.26-1.el5

Comment 5 errata-xmlrpc 2007-11-07 16:49:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0516.html