[CentOS] Steps to create a mirrored CentOS system?

Morten Torstensen morten at mortent.org
Mon Feb 5 08:28:37 UTC 2007


Les Mikesell wrote:
> You'd have slightly better performance if you put / and swap on the 
> first drive and make /var a RAID1 with the other two drives.  You'll 
> have better fail-over protection if you use 2 drives with all partitions 
> mirrored.  You'll have to decide which is more important.

You can also mirror with all three drives. Linux LVM mirroring is still 
at a stone age level, but you can use md to mirror.

Reserve the first 100MB on each drive for /boot, then make two equal 
size partitions on each drive for md raid. Disk1-P1 mirrors Disk2-P1, 
Disk2-P2 mirrors Disk3-P1 and Disk1-P2 mirrors Disk3-P2. Now define all 
as PVs and add them to one or more VGs. Depending on how you spread the 
load, there could be potential performance bottlenecks, but you can now 
use all the space on all three drives.

It would be better and more flexible if LVM could map multiple PEs to a 
single LE, but alas that is not the path the LVM guys chose. They are 
too stuck in the DOS partition table paradigm I think and think of 
filesystems/LVs as the smallest logical block.

In case you are not familiar with LVM terminology:

VG: Volume Group, a collection of storage space for use
PV: Physical Volume, storage space from a disk or partition
PE: Physical Extent, a block of storage from a VG
LE: A Logical Extent,  where you actually define a LV (if Linux LVM 
supported PE mapping)
LV: A Logical Volume, where you create filesystems, swap space or raw 
devices.


-- 

//Morten Torstensen
//Email: morten at mortent.org
//IM: Cartoon at jabber.no morten.torstensen at gmail.com

And if it turns out that there is a God, I don't believe that he is evil.
The worst that can be said is that he's an underachiever.



More information about the CentOS mailing list