Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have hard discs D1 and D2 which are 140GB each and D3,D4 which are 600GB. I've been reading about the benefits of using LVM and I was thinking about the following configurations.

This one would be the one that makes sense to me cause I really want to keep OS/Data load in separated disks. But what has me thinking is that I'll only have 30-40GB left in the LV in case I need to expand home/usr/root. (Which is less likely to happen but you never know...)

|var,usr,home |   /data    |
 --------------------------
|   LVM Vol   |   EXT3/4   |
 --------------------------
|  HW RAID1   |  HW RAID1  |
 --------------------------
|  D1  |  D2  |  D3  | D4  |

Now, this crazy setup came to my mind and I dont know if its possible. Point of it is to create an LVM of both RAIDs making one huge VG of 740GB. This will give me a lot of flexibility in case I need to expand something.

| var,usr ,home, data ...  |
 --------------------------
|         LVM Vol          | 
 --------------------------
|    HW RAID1 |  HW RAID1  |
 --------------------------
|  D1  |  D2  |  D3  | D4  |

Is this possible? If it is, how can it affect performance compared to the first setup since Id like to keep OS/data load separated?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Yes the second configuration is possible.

LVM Volume Groups exist for exactly this reason: to put space from few Physical Volumes together.

Moreover, you can tell LVM to put your /data on D3/D4 RAID. Just do a

lvcreate -n data -L 600GB VolumeGroupName /dev/sdb1

So from performance point of view it won't change anything: data will be on big drives, all other volumes will be on small disks. Later you can use pvmove to move specific volumes (or parts of them) to other disks.

share|improve this answer
    
Thank you sir!! –  Rhyuk Aug 8 '12 at 18:41
add comment

The solution I'd use is a hybrid of your first attempt:

|var,usr,home |   /data    |
 --------------------------
|LVM LV1,2,3  |   LVM LV0  |
 --------------------------
|   LVM VG    |   LVM VG   |
 --------------------------
|  HW RAID1   |  HW RAID1  |
 --------------------------
|  D1  |  D2  |  D3  | D4  |

That way, your 4 mount-points can be migrated between Volume Groups. That seems to make some degree of sense.

You'd then have

/var mounted as LVM LogicalVolume 1, formatted as EXT3/4
/home mounted as LVM LogicalVolume 3, formatted as EXT3/4
/usr mounted as LVM LogicalVolume 2, formatted as EXT3/4
/data mounted as LVM LogicalVolume 0, formatted as EXT3/4
share|improve this answer
    
Would I still be able to add lets say 10GB, from LV0 to LV1 without any problems? –  Rhyuk Aug 7 '12 at 19:10
    
It depends if you left some space free on either of the VGs to expand into. –  Tom O'Connor Aug 7 '12 at 19:59
    
The difference of your example from my second configuration is that I thought about 1 big VG instead of 2 like you suggested. Whats the benefit of this? –  Rhyuk Aug 7 '12 at 20:14
    
Keeps me sane. That's all. –  Tom O'Connor Aug 7 '12 at 23:57
    
Thank you for your information sir! –  Rhyuk Aug 8 '12 at 18:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.