[Openstack] LVM over LVM is acceptable?

Dean Troyer dtroyer at gmail.com
Tue Nov 27 04:34:29 UTC 2012


On Mon, Nov 26, 2012 at 8:04 PM, Lei Zhang <zhang.lei.fly at gmail.com> wrote:
> Another question. If the vm treat the vol-0 as a normal block device, is it
> necessary to partition? If not, the fdisk will show Disk /dev/vdb doesn't
> contain a valid partition table. If yes, how can I extend the volume on the
> vm? It seems that treat the volume as a normal block device is not a good
> idea.

It is not necessary to partition the device (vdb) inside com-0.  If
you use it as an LVM physical device (PV) inside com-0 then pvresize
will update the metadata o recognize the new size inside com-0 after
you lvextend the vol-0 in the host.

If you do partition /dev/vdb and don't use LVM in com-0 it is still
possible to grow a partition, but you'll have to delete and re-create
the last partition to get com-0 to recognize the additional space.
And you'd also need to do the filesystem resize too.

Nested LVM can be tricky but if you are careful to keep the layers
separated it can work.

dt

-- 

Dean Troyer
dtroyer at gmail.com




More information about the Openstack mailing list