Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-28-2009, 12:42 PM   #1
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, FC, Ubuntu
Posts: 116

Rep: Reputation: 17
Advice on LVM planning. Disadvantage to more Volume Groups?

I've been using LVMs on some of my Linux servers for years without fully "getting" them. Doing a lot of things by rote. As I setup a new RAID though, I realize I don't have to be so rigid.

I inherited a mission critical server with five independent disks
/dev/sdb1    /usr1            
/dev/sdc1    /usr2
/dev/sdd1    /usr3
/dev/sde1    /usr4
/dev/sdf1    /usr5
I've bought an external RAID5 box that I plan to migrate the data to and was planning on this layout
Method 1
 				VG	LogVol
/dev/sdb1	/usr1 -> 	usr1	disk1	           
/dev/sdc1	/usr2 ->	usr2	disk1
/dev/sdd1	/usr3 ->	usr3	disk1
/dev/sde1	/usr4 ->	usr4	disk1
/dev/sdf1	/usr5 ->	usr5	disk1
mainly because the 1 to 1 correspondence is easy for me to understand, and what I'm used to.

But I realize it doesn't have to be that way, and I could have one VG with all the LVMs as parts of it, i.e.
Method 2
				VG	LogVol
/dev/sdb1	/usr1 -> 	array	usr1	           
/dev/sdc1	/usr2 ->	array	usr2
/dev/sdd1	/usr3 ->	array	usr3
/dev/sde1	/usr4 ->	array	usr4
/dev/sdf1	/usr5 ->	array	usr5
MY QUESTION IS: is there any advantage to one way over the other?

Would using one VG with multiple LVs be kind of like "putting all my eggs in one basket"?

Do more VGs and LVs introduce unwanted overhead into the LV Mgr that should be frowned upon?

If both methods are equal, I go with the method1. Just more clear to me. But now that I understand the second, I could go that way, if there's a compelling reason.

Any thoughts?

- Van

Last edited by Vanyel; 04-28-2009 at 12:43 PM. Reason: typo
Old 04-28-2009, 04:01 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,681
Blog Entries: 14

Rep: Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022
Method 2 is the way most folks would do it because it gives you the main benefit of LVM.

That is with LVM you can put all the disks into a single Volume Group (VG - think of it as a logical disk) that you can then split up into multiple Logical Volumes (LVs - think of them as logical partitions).

The benefits to this method are:
1) You aren't limited to 8 partitions as you are on a physical disk - you can have many many LVs.
2) You can more easily adjust space. If you have an LV that needs more space you can just add it from what is in the VG or add another disk to the VG if you've used all space then allocate that to the LV. If you had hard partitions on a physical disk this would be a much more difficult thing to deal with - usually requiring you to create a brand new partition and manually migrating things over.

The only real benefit to method 1 over method 2 is that you can be sure that only the filesystem you want is on a specific disk and the only reason you would want that is to isolate its performance from the other disks. For most purposes this is unnecessary. In fact if you're going to do method 1 you might as well not do LVM at all and just partition the disks to use the entire disk for the filesystems.
Old 04-28-2009, 04:04 PM   #3
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
Well, In the first case you may be better off without LVM. One-to-one correspondence between disks visible to OS and partitions means you do not have, for example, easy resizing. Maybe mdadm for software raid would be a better choice than LVM. As for eggs and baskets, LVM has non-ideal reputation when we speak about recoverability after hardware failure (including repeated power failuires). I use dmsetup table > /etc/lvm-layout (and backup lvm-layout) to have any chance of recovering non-trivial LVM failure
Old 04-28-2009, 04:09 PM   #4
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, FC, Ubuntu
Posts: 116

Original Poster
Rep: Reputation: 17
Hmmmm ... sorry. To simplify the model, I didn't mention that there's about a TB of unused space outside of these that I can allocate freely as needed. So either method can gain the space flexibility of LVM.
Old 04-28-2009, 04:11 PM   #5
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
Vanyel - these are seemingly partitions on distinct disks. If the free space is on each of the disks, you cannot redistribute between disks unless they are in a single VG.
Old 04-28-2009, 08:46 PM   #6
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,258

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
There's a good LVM guide here: but basically LVs (logical vols) are carved out of a VG (vol group). I don't believe method 1 as you describe it is possible, unless you mean to have multiple VGs all with the same named LV, which is possible, but it doesn't constitute one huge LV. Think dirs/sub-dirs


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
Fedora LVM volume group & Physical Volume resize problem gabeyg Fedora 1 05-14-2008 12:26 PM
shutting down LVM volume groups aztek Debian 2 06-02-2006 10:58 PM
Can I delete LVM Volume Groups? second_existence Linux - Newbie 1 01-24-2006 11:20 PM
Planning on getting Verizon DSL - Looking for advice. IamI Slackware 6 10-16-2005 02:46 PM
Activating LVM Volume Groups at startup TomF Linux - Newbie 0 05-05-2004 06:05 PM

All times are GMT -5. The time now is 04:18 PM.

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