[K12OSN] Re: how's this raid setup?

Les Mikesell les at futuresource.com
Fri Sep 2 12:49:20 UTC 2005


On Fri, 2005-09-02 at 01:50, Robert Arkiletian wrote:

> Wow thanks for the excellent reply Les! I was thinking of four primary
> partitions having both sda and sdb exactly the same.(36 GB each)
> 
> /         13 GB
> /home  20 GB 
> /var     2 GB
> swap   1 GB (since I've got 4 GB of ram and I never hit swap)
> 
> So if sda failed, would the swap on the second drive shift?

First, note that they don't shift until the next boot.  Then
if one isn't available, you'll still boot and use any others
listed in fstab.  It will check that they really are swap
partitions before using them.  Also, md devices are normally
autodetected anyway - the problem is more when fstab has
entries for /dev/sdcn and they shift up to /dev/sdbn because
an earlier device is missing.

>   BTW I thought multiple swap partitions on seperate drives
> automatically use raid 0. So do I need to state that they are a raid
> device? Wait I just thought about this for a second. I think they HAVE
> to be defined as a raid1 device. Assume you go into swap then one
> drive fails. If it's raid0 you are going down bigtime!! So I think
> they have to be explicitly defined as a raid1 device.

There is some controversy about this because the system will
use multiple swap partitions and perhaps be slightly faster
because of the raid0 striping effect.  However, if you want
to keep on running as one of the drives breaks you need to
configure raid1 and swap on the md device.

I've had some problems using disk druid to create the layout
I wanted with multiple partitions on the same drives but it
might be fixed by now.  You should be able to create matching
raid partitions on each drive, select them and create a raid
device with the mount point and filesystem you want.  The problem
I've had is that the system re-arranges the positions on the
disk so /boot isn't always first.  If this happens you can
nail down the layout by doing an fdisk first with the partition
sizes you want and partition type of FD.

By the way, the current beta of SME server 7.x based on Centos4
does a neat trick.  If you install on a single drive it builds
a 'broken' raid1 so at any time later you can add a 2nd drive
and mirror the partitions to it.

-- 
  Les Mikesell
    les at gmail.com





More information about the K12OSN mailing list