Not logged in
Log in now
Create an account
Subscribe to LWN
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
Fedora and LVM
Posted Nov 2, 2012 7:49 UTC (Fri) by Cato (subscriber, #7643)
One tip for using LVM is to never use the default VG and LV names, to avoid this sort of thing.
I've lost far more time (and data) due to LVM complexities/issues than I have saved through easy expansion/moving of FSs. It makes upgrades and transferring to new PCs much more complex.
Posted Nov 2, 2012 13:07 UTC (Fri) by Tobu (subscriber, #24111)
I've just tried it (using a VM to create a colliding VG name, then kpartx -a to make the nested partitions show up).
$ sudo pvscan
WARNING: Duplicate VG name V2: Existing 5daecde1-e30c-4ef8-bcf6-e501382f67b7 (created here) takes precedence over 8b814833-1a37-47d4-896d-5a8aa74f458f
PV /dev/mapper/sda2p1 VG V2 lvm2 [1016,00 MiB / 0 free]
PV /dev/sda5 VG V2 lvm2 [1,82 TiB / 13,00 GiB free]
$ sudo vgrename 8b814833-1a37-47d4-896d-5a8aa74f458f V3
Volume group "V2" successfully renamed to "V3"
Accessing the partition was very easy, but then I had to edit the root= boot parameter to boot the VM (vgcfgrestore to undo the rename would also work). This could be improved by having root= be uuid-based (which Debian/Ubuntu don't do for LVM, don't know about Fedora), as well as by having the Fedora installer pick a more unique VG name.
Debian and Ubuntu pick the hostname as the VG name, this seems like a good way to prevent these collisions entirely.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds