[linux-lvm] Encapsulate existing partition / Moving logical volumes

Stuart D. Gathman stuart at bmsi.com
Tue Mar 6 01:38:16 UTC 2007


On Mon, 5 Mar 2007, Vern Kyle wrote:

> 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.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    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.




More information about the linux-lvm mailing list