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.
I'm looking to get a Xen cluster running (using drbd, Pacemaker and OCFS2) and nearly every how-to I look at uses LVM and creates a new LV for each virtual machine.
Looking further, a how-to on creating an HA NFS cluster does something similar, creating a new LV for each NFS export.
Why does LVM get used so much in environments like this? I suppose I could see the usage on NFS, but with the Xen cluster, having to create a new LV for each virtual machine adds a lot of extra work.
My understanding is that the creation of a new LV gives a flexible way to create a block device that is not sitting on top of a filesystem. If you create a disk file, then that has to traverse ext4 (or other) before hitting disk. By using LVM there is no filesystem in the way to put overhead on it. I think it's pretty slick actually, and it's really NOT a lot of extra work at all.
Last edited by acid_kewpie; 02-10-2012 at 02:18 PM.
Thanks acid_kewpie. So you think it's done for performance reasons, then? From the small amount of evidence I've read I was getting the impression that Pacemaker prefers it to be on an LVM for some sort of management reason. Perhaps so it can control the locking of the virtual disk better.
Do I understand correctly that when you have Xen access a LV, the LV doesn't need to have a filesystem? Not even OCFS2? How are concurrent writes prevented? Through Pacemaker?
Well I'm no clustered filesystem expert, someone else, probably you, are a better judge of that side, but as far as the usage of it, you'd have a block device presented which would be your VG, and then further LV's on that would be independent block devices. You would be using those LV's in a way that should be managed to not require concurrent writes. You should have no reason to think a virtual disk is going to be accessed by more than one VM in the first place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.