LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 02-10-2012, 03:05 PM   #1
IMNOboist
Member
 
Registered: Nov 2003
Location: Northern Utah
Distribution: OpenBSD, Ubuntu, Linux Mint, Knoppix
Posts: 56

Rep: Reputation: 16
Why always LVM in HA environments?


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.
 
Old 02-10-2012, 03:16 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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 03:18 PM.
 
Old 02-10-2012, 03:23 PM   #3
IMNOboist
Member
 
Registered: Nov 2003
Location: Northern Utah
Distribution: OpenBSD, Ubuntu, Linux Mint, Knoppix
Posts: 56

Original Poster
Rep: Reputation: 16
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?

Sorry to bombard with more questions.
 
Old 02-10-2012, 03:37 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
  


Reply

Tags
ha, lvm, nfs, xen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with LVM mirror and failed PV, can't recover -- Debian Squeeze lvm 2.02.66-5 Linux Ninja Linux - Server 0 08-15-2011 12:43 AM
LVM REDUCE HOW TO UNMOUNT /dev/volumegroup/lvm crahuldba@gmail.com Linux - Newbie 3 10-29-2010 08:49 AM
Adding an LVM hard disk to a system already running/using LVM firewiz87 Linux - Hardware 5 08-15-2010 01:59 AM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 01:26 PM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 12:16 PM


All times are GMT -5. The time now is 08:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration