Presenting logical volume from host to KVM guest. Partition within guest?
Hi everyone
I've just been looking at rebuilding a small KVM host I've had running for a couple of years. Just checked and there's a mail server guest (large database) where I have presented a logical volume to it. But inside that guest I'm not using LVM but have created a single partition with a regular file system. Would it not be better to add the host's LV as a PV within the guest? Then I can expand the LV at the host level, do a vgextend, lvextend and a resize2fs. Instead of worrying about having to resize a partition. That wouldn't cause any issues at the host level would it? The guest storing LVM metadata within a host's LV? Cheers, B |
It wouldn't hurt, but there is not a big advantage.
You can put a filesystem on the unpartitioned PV in the guest. When you expand the LVM on the host, reboot the guest or run blockdev to update the size, then expand the filesystem. |
Quote:
In a normal LVM scenario I never bother partitioning PVs first because I always end up having to reboot the VM. I understand the risk of not partitioning is that if you took the disk to a machine that didn't understand LVM then it might try and "initialize" it automatically and start partitioning/nuking data. But I can't think of any time where that's been even a vague consideration so I prefer to just increase the size of the disk in VMware then increase the VG, LV, FS. |
All times are GMT -5. The time now is 04:31 AM. |