Encapsulate existing partition / Moving logical volumes
I'm in the process of converting a couple of servers to use lvm2, and there are two items that I can not find a reference for in the how-to or on the lvm wiki.
First, is there a method to encapsulate an existing disk partition into a logical volume? (I can copy all of the data manually, but I'm thinking there is an eloquent way to accomplish this.)
Second, I have found references to moving a volume group between different physical volumes. Is there a method to moving logical volumes between volume groups?
If someone could provide a hint or a pointer to the documentation I'm overlooking, I'd appreciate it.
Thanks,
Vern
Quoted 3 lines · Vern Kyle
First, is there a method to encapsulate an existing disk partition into a logical volume? (I can copy all of the data manually, but I'm thinking there is an eloquent way to accomplish this.)
Since the LVM metadata takes up room, and is stored at the beginning, I don't see how a partition could be "converted" easily. You could
1) shrink the fs
2) use a special copy to move up the fs enough blocks to make room for metadata (by starting at the end and working towards the beginning of the partition).
3) create the PV metadata and allocate the LV without zeroing the beginning.
However, by that time, you might as well have copied the data. The only utility would be if there was no room - and it would be highly dangerous.
Signature · 4 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.