[CentOS] Re: Advice on setting up Raid and LVM
ssilva at sgvwater.com
Thu Mar 2 23:23:17 UTC 2006
Bowie Bailey spake the following on 3/2/2006 6:47 AM:
> Matt Hyclak wrote:
>> On Thu, Mar 02, 2006, Fajar Priyanto enlightened us:
>>> I'm setting up Centos4.2 on 2x80GB SATA drives.
>>> The partition scheme is like this:
>>> /boot = 300MB
>>> / = 9.2GB
>>> /home = 70GB
>>> swap = 500MB
>>> The RAID is RAID 1.
>>> md0 = 300MB = /boot
>>> md1 = 9.2GB = LVM
>>> md2 = 70GB = LVM
>>> md3 = 500MB = LVM
>>> Now, the confusing part is:
>>> 1. When creating VolGroup00, should I include all PV (md1, md2,
>>> md3)? Then create the LV.
>>> 2. When setting up RAID 1, should I make those separated partitions
>>> for /, /home, and swap? Or, should I just make one big RAID device?
>>> The future purpose of using LVM is I want to be able to expand any
>>> partitions that would run out of space into a new disk.
>> Personally, I would do:
>> md0 = 300MB (/boot)
>> md1 = 500MB (swap)
>> md2 = remainder (pv.00)
>> I would then create a single volume group on md2, create / and home,
>> but I would leave 20-30% of the VG empty so you can expand later.
>> That would work out to like 10GB /, and 50GB /home, and leave you 15
>> or so GB for expansion.
> Or you could do this:
> RAID 1 partition:
> md0 = 80GB (or whatever the useable total is)
> Then include md0 in VolGroup00 and create your logical volumes.
> LV0 = 300MB (/boot)
> LV1 = 500MB (swap)
> LV2 = 9.2GB (/)
> LV3 = 70GB (/home)
> This way everything is mirrored and everything is in one VG. If you
> need more space, add another pair of mirrored drives and add the new
> mirrored device into VolGroup00. Then you can use the space to expand
> whichever filesystem needs it. I would also advise following the
> previous poster's advice and leaving a few GB unused so that you
> aren't forced to add more drives immediately when LV2 fills up faster
> than you expected.
But you can't boot from a /boot partition in LVM. It needs to be either a
physical partition or a raid1 array.
More information about the CentOS