LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 02:05 PM   #1
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

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

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 02-10-2012, 02:23 PM   #3
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

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, 02:37 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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



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 2 06-02-2017 04:50 PM
LVM REDUCE HOW TO UNMOUNT /dev/volumegroup/lvm crahuldba@gmail.com Linux - Newbie 3 10-29-2010 07:49 AM
Adding an LVM hard disk to a system already running/using LVM firewiz87 Linux - Hardware 5 08-15-2010 12:59 AM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 12:26 PM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:22 PM.

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
Open Source Consulting | Domain Registration