[lug] Server Partitioning Recommendation

Hugh Brown hugh at math.byu.edu
Thu Jan 18 19:46:13 MST 2007

karl horlen wrote:
>> I would make separate logical volumes for /, /tmp,
>> /usr, /var, /home, 
>> /srv, swap.  If you want to share kernels between
>> multiple installs make 
>> a partition for /boot (I usually don't).
>> On a machine like this I would make one partition
>> per disk for RAID or 
>> LVM.  I have a machine that I might want to install
>> other things on 
>> later so I made more than one partition in case the
>> other things don't 
>> do LVM.
> Just so I'm clear, you are saying that you only have
> one big physical partition on each drive?  Then you
> just carve them up logically with LVM.  
> Assuming I have a RAID1 setup and I need more disk
> space in the future, I would add 2 more drives to the
> system.
> Since the original LVs were built on top of first 2
> pairs of RAIDed drives will it be possible to extend
> the LVs to the 2 new drives since they are "not" part
> of the original RAID?
> I guess I'm wondering if it's straightforward to add
> new physical disk capacity to LVMs that are built on a
> raid?  Having never done this I don't want to be
> bitten  when it comes time to upgrade in the future.
> thanks for your help

I recently did a PV on a machine with hardware raid and two RAID1 groups.

pvcreate /dev/cciss/c0d1 /dev/cciss/c0d2
vgcreate vg01 /dev/cciss/c0d1 /dev/cciss/c0d2
lvcreate ...

I haven't tested this, but I believe in your hypothetical case you'd do:

pvcreate /dev/cciss/c0d1
vgcreate vg01 /dev/cciss/c0d1
lvcreate .....

then later

pvcreate /dev/cciss/c0d2
vgextend vg01 /dev/cciss/c0d2

and then you'd be able to resize the LVs as needed (being careful about 
which filesystems are on the LVs) or create new LVs, etc.

I've used ext2online to resize ext3 filesystems on LVM2 LV's on RH4.

I assume the above would work with software raided devices as well.


More information about the LUG mailing list