Presenting logical volume from host to KVM guest. Partition within guest?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
Woah, an FS on an unpartitioned PV in the guest? So no VG/LV in the guest?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.