Bug 796602
Summary: | "lvconvert --splitmirrors" can create not valid Logical Volume names | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Pierguido Lambri <plambri> |
Component: | lvm2 | Assignee: | Alasdair Kergon <agk> |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3 | CC: | agk, cmarthal, dwysocha, mbroz, prajnoha, thornber, zkabelac |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.95-3.el6 | Doc Type: | Bug Fix |
Doc Text: |
If a Volume Group name is supplied with the Logical Volume name, 'lvconvert --splitmirrors' fails to strip it off. This leads to an attempt to use a Logical Volume name that is invalid.
This release detects and validates any supplied Volume Group name correctly.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 15:01:44 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
Pierguido Lambri
2012-02-23 10:00:22 UTC
I've updated vg_validate (which validates the metadata independently before writing it to disk) to catch bugs like this. Like other tools, this should validate the VG name, if present, and strip it to obtain the LV name. The cmdline rules are: VG name needs to appear at least once on cmdline. If more than one VG name on cmdline, they must all match. (In reply to comment #2) > I've updated vg_validate (which validates the metadata independently before > writing it to disk) to catch bugs like this. In lvm2 v2.02.93, moving bug to POST: [0] devel/~ # lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lvol0 vg mwi-a-m- 4.00m lvol0_mlog 100.00 [0] devel/~ # lvconvert --splitmirrors 1 --name vg/abc vg/lvol0 Internal error: LV name vg/pokus has invalid form. Intermediate VG metadata write failed. [0] devel/~ # lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lvol0 vg mwi-a-m- 4.00m lvol0_mlog 100.00 [0] devel/~ # dmsetup info -c -o name Name vg-lvol0 vg-lvol0_mimage_1 vg-lvol0_mimage_0 vg-lvol0_mlog [0] devel/~ # vgs VG #PV #LV #SN Attr VSize VFree vg 9 0 0 wz--n- 1.09g 1.09g [0] devel/~ # lvcreate -l1 -n vg/a vg Logical volume "a" created [0] devel/~ # lvcreate -l1 -n xyz/b vg Inconsistent volume group names given: "xyz" and "vg" Run `lvcreate --help' for more information. ...well, sorry, moving back from POST, this still needs one small patch for the processing to be consistent for all LVM comamnds (like described in comment #3). (though the original problem is resolved already) I've added the additional patch so now we have (taking into account comment #3): devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one Logical volume mirrored_one converted. devel/~ # lvconvert --splitmirrors 1 -n abc/splitted_one vg/mirrored_one Please use a single volume group name ("vg" or "abc") Run `lvconvert --help' for more information. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: If a Volume Group name is supplied with the Logical Volume name, 'lvconvert --splitmirrors' fails to strip it off. This leads to an attempt to use a Logical Volume name that is invalid. This release detects and validates any supplied Volume Group name correctly. Fix verified in the latest rpms. 2.6.32-269.el6.x86_64 lvm2-2.02.95-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 lvm2-libs-2.02.95-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 lvm2-cluster-2.02.95-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 udev-147-2.40.el6 BUILT: Fri Sep 23 07:51:13 CDT 2011 device-mapper-1.02.74-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 device-mapper-libs-1.02.74-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 device-mapper-event-1.02.74-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 device-mapper-event-libs-1.02.74-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 cmirror-2.02.95-7.el6 BUILT: Wed May 2 05:14:03 CDT 2012 [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices mirror hayes mwi-a-m- 12.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0),mirror_mimage_2(0) [mirror_mimage_0] hayes iwi-aom- 12.00m /dev/etherd/e1.1p1(0) [mirror_mimage_1] hayes iwi-aom- 12.00m /dev/etherd/e1.1p2(0) [mirror_mimage_2] hayes iwi-aom- 12.00m /dev/etherd/e1.1p3(0) [mirror_mlog] hayes lwi-aom- 4.00m /dev/etherd/e1.1p9(0) [root@hayes-01 ~]# lvconvert --splitmirrors 1 --name hayes/mirror1 hayes/mirror Logical volume mirror converted. [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices mirror hayes mwi-a-m- 12.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) mirror1 hayes -wi-a--- 12.00m /dev/etherd/e1.1p3(0) [mirror_mimage_0] hayes iwi-aom- 12.00m /dev/etherd/e1.1p1(0) [mirror_mimage_1] hayes iwi-aom- 12.00m /dev/etherd/e1.1p2(0) [mirror_mlog] hayes lwi-aom- 4.00m /dev/etherd/e1.1p9(0) [root@hayes-01 ~]# lvconvert --splitmirrors 1 --name foo/bar hayes/mirror Please use a single volume group name ("hayes" or "foo") Run `lvconvert --help' for more information. 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. http://rhn.redhat.com/errata/RHBA-2012-0962.html |