Summary: | sys-fs/lvm2 vgsplit detects PV in wrong VG and won't perform split | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joe Harvell <landshark> |
Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
Status: | VERIFIED TEST-REQUEST | ||
Severity: | minor | CC: | agk, cardoe |
Priority: | High | ||
Version: | 2008.0 | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Joe Harvell
2009-04-02 22:05:11 UTC
Updating severity to minor since there is a workaround.....if you specify the PVs explicitly to be removed instead of implicitly by vgname, then it works joey@saluki ~ $ sudo vgsplit --verbose --debug london munich /dev/sda /dev/sdc Password: Checking for volume group "london" Checking for new volume group "munich" Wiping cache of LVM-capable devices Archiving volume group "london" metadata (seqno 185). Logical volume "mytharc" must be inactive joey@saluki ~ $ sudo lvchange -an /dev/london/mytharc joey@saluki ~ $ sudo vgsplit --verbose --debug --name mytharc london munich Checking for volume group "london" Checking for new volume group "munich" Wiping cache of LVM-capable devices Archiving volume group "london" metadata (seqno 185). Physical volume /dev/sda not in volume group london joey@saluki ~ $ sudo vgsplit --verbose --debug london munich /dev/sda /dev/sdc Checking for volume group "london" Checking for new volume group "munich" Wiping cache of LVM-capable devices Archiving volume group "london" metadata (seqno 185). Writing out updated volume groups Archiving volume group "munich" metadata (seqno 0). Creating volume group backup "/etc/lvm/backup/munich" (seqno 1). Creating volume group backup "/etc/lvm/backup/london" (seqno 186). Creating volume group backup "/etc/lvm/backup/munich" (seqno 2). New volume group "munich" successfully split from "london" joey@saluki ~ $ sudo pvs PV VG Fmt Attr PSize PFree /dev/md/saluki:r10_0 bayeux lvm2 a- 40.00G 3.50G /dev/md/saluki:r5_0 bayeux lvm2 a- 360.00G 7.00G /dev/sda munich lvm2 a- 232.83G 21.83G /dev/sdb3 london lvm2 a- 277.41G 19.03G /dev/sdc munich lvm2 a- 279.48G 0 /dev/sdd6 bayeux lvm2 a- 150.00G 37.91G /dev/sde6 bayeux lvm2 a- 150.00G 38.09G /dev/sde7 bayeux lvm2 a- 150.00G 39.41G joey@saluki ~ $ jharvell: - what version of lvm2 are you using? - Can you please repeat your tests with lvm2-2.02.49? - please always include emerge --info output. The LVM version information was buried in the original description. I have copied it below: joey@saluki ~ $ sudo lvm version LVM version: 2.02.42 (2008-10-26) Library version: 1.02.28 (2008-09-18) Driver version: 4.14.0 tested with lvm2-2.02.49 and the bug apparently no longer exists I was able to do the split with test PVs, LVs and VGs as follows: joey@saluki ~ $ sudo pvcreate /dev/london/testpv1 Physical volume "/dev/london/testpv1" successfully created joey@saluki ~ $ sudo pvcreate /dev/london/testpv2 Physical volume "/dev/london/testpv2" successfully created joey@saluki ~ $ sudo pvcreate /dev/london/testpv3 Physical volume "/dev/london/testpv3" successfully created joey@saluki ~ $ sudo vgcreate -s 8M testvg /dev/london/testpv1 Volume group allocation policy is already normal Volume group "testvg" successfully created joey@saluki ~ $ sudo vgextend testvg /dev/london/testpv2 /dev/london/testpv3 Volume group "testvg" successfully extended joey@saluki ~ $ sudo pvs PV VG Fmt Attr PSize PFree /dev/dm-34 testvg lvm2 a- 96.00M 96.00M /dev/dm-44 testvg lvm2 a- 96.00M 96.00M /dev/dm-45 testvg lvm2 a- 96.00M 96.00M [snip] joey@saluki ~ $ sudo lvcreate -L 10M -n testlv1 testvg Rounding up size to full physical extent 16.00 MB Logical volume "testlv1" created joey@saluki ~ $ sudo lvextend -L 150M /dev/testvg/testlv1 Rounding up size to full physical extent 152.00 MB Extending logical volume testlv1 to 152.00 MB Logical volume testlv1 successfully resized joey@saluki ~ $ sudo lvdisplay --maps /dev/testvg/testlv1 --- Logical volume --- LV Name /dev/testvg/testlv1 VG Name testvg LV UUID cZysnq-mmW1-BJMG-1S62-zzdD-sFjN-a1xFXd LV Write Access read/write LV Status available # open 0 LV Size 152.00 MB Current LE 19 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:46 --- Segments --- Logical extent 0 to 11: Type linear Physical volume /dev/dm-34 Physical extents 0 to 11 Logical extent 12 to 18: Type linear Physical volume /dev/dm-44 Physical extents 0 to 6 joey@saluki ~ $ sudo lvcreate -L 10M -n testlv2 testvg /dev/dm-45 Rounding up size to full physical extent 16.00 MB Logical volume "testlv2" created joey@saluki ~ $ sudo pvs PV VG Fmt Attr PSize PFree /dev/dm-34 testvg lvm2 a- 96.00M 0 /dev/dm-44 testvg lvm2 a- 96.00M 40.00M /dev/dm-45 testvg lvm2 a- 96.00M 80.00M [snip] joey@saluki ~ $ sudo lvchange -an /dev/testvg/testlv1 joey@saluki ~ $ sudo vgsplit --verbose --debug --name testlv1 testvg newtestvg Checking for volume group "testvg" Checking for new volume group "newtestvg" Wiping cache of LVM-capable devices Volume group allocation policy is already normal Archiving volume group "testvg" metadata (seqno 5). Writing out updated volume groups Archiving volume group "newtestvg" metadata (seqno 0). Creating volume group backup "/etc/lvm/backup/newtestvg" (seqno 1). Creating volume group backup "/etc/lvm/backup/testvg" (seqno 6). Creating volume group backup "/etc/lvm/backup/newtestvg" (seqno 2). New volume group "newtestvg" successfully split from "testvg" joey@saluki ~ $ sudo pvs PV VG Fmt Attr PSize PFree /dev/dm-34 newtestvg lvm2 a- 96.00M 0 /dev/dm-44 newtestvg lvm2 a- 96.00M 40.00M /dev/dm-45 testvg lvm2 a- 96.00M 80.00M [snip] |