SLUG Mailing List Archives
Re: [SLUG] RAID
- To: James Gregory <james@xxxxxxxxxxx>
- Subject: Re: [SLUG] RAID
- From: Grant Parnell <gripz@xxxxxxxxxxx>
- Date: Thu, 12 Feb 2004 12:20:08 +1100 (EST)
- Cc: slug@xxxxxxxxxxx
On Wed, 11 Feb 2004, James Gregory wrote:
> Hi all,
> I'm intending to setup RAID on my home workstation for the first time
> ever tonight. It will be a fresh install on a pair of 160GB SATA drives.
> I have a couple of questions for the RAID gurus out there.
> I've got CDs for Mandrake 9.2 and Fedora Core 1 -- are either of these
> two easier from the perspective of setting up RAID at install time? I've
> heard that FC1 does this. I have no idea if the Mandrake installer does,
> though the docs on diskdrake claim that it does have RAID support.
> I'll look into the details if it turns out I'm forced to do this, but
> I'd like to know in advance how hard it is to turn a standard
> single-drive install into a RAID system. Any ideas? I assume this
> involves running one of the drives in failed state or similar.
> What's the deal with swap? I'd prefer for a failed drive not to take my
> machine down, and swap is a potential problem there, though I could
> probably accept it killing processes that happen to be swapped out. Is
> Linux's (I'll be running a 2.6 kernel just as soon as I've got
> everything setup) swap support smart enough to detect dead drives and
> kill processes swapped on those drives, or will have to do RAID swap as
> Finally, my motherboard (an Abit IIRC) claims to have an on-board
> Highpoint hardware RAID controller. Is there any compelling reason to
> use this vs software RAID? Is the RAID on-disk format standardised
> between controllers? (ie if I do use hardware RAID, will I have issues
> moving these drives to another computer?)
OK as far as partitioning goes I'd recommend a) ensuring the BIOS is set
to the same capabilities for the drives and b) using fdisk from the
command prompt during the install or in rescue mode to check/force the
drives to have similar geometry. IE I've had them report varying
cylinders/heads/sectors for the same model of drive.
Say it's got 4000 cylinders
/dev/hda1 1-100 Linux Raid Autodetect (/dev/md0 raid-1 /boot **)
/dev/hda2 101-1000 Linux Raid Autodetect (/dev/md1 raid-1 swap)
/dev/hda3 1001-4000 Extended
/dev/hda5 1001-2000 Linux Raid Autodetect (/dev/md2 raid-1 /)
/dev/hda6 2001-4000 Linux Raid Autodetect (/dev/md3 raid-1 /home)
/dev/hdc1 1-100 Linux Raid Autodetect (/dev/md0 raid-1 /boot **)
/dev/hdc2 101-1000 Linux Raid Autodetect (/dev/md1 raid-1 swap)
/dev/hdc3 1001-4000 Extended
/dev/hdc5 1001-2000 Linux Raid Autodetect (/dev/md2 raid-1 /)
/dev/hdc6 2001-4000 Linux Raid Autodetect (/dev/md3 raid-1 /home)
At this point you can reboot and do your regular install, just manually
add the appropriate partitions to the raid devices and then select which
mounts they're going to be. In RedHat/Fedora this is in disk druid,
Mandrake's is probably equally capable although I don't know for sure.
** For those setting up raid-5 systems, /boot can only be raid-1 because
it will need to be read by lilo/grub which don't have raid capability.
Lilo/grub will write to both drive's boot sectors during install.
Basically a component partition of a raid-1 system can be mounted as the
native filesystem in emergencies or boot time (ie mount -t ext2 /dev/hda1
/mnt/sysimage/boot would work). That's not saying you can mount a plain
ext2 filesystem as a part of a raid system however.
Setting up the partitions to be the same isn't technically necessary but
it will make your life a lot easier when it comes to repairing the setup
when a drive fails (ie you have the other partition table as a handy
reference). Also for some reason RedHat's disk druid has some weird ideas
for partitioning - even in manual mode. I like to keep the system
partitions up-front leaving open the possibility of partition
re-arrangement (even without LVM).
Oh yeah... if you've got huge disks LVM is nice, the caveat is you CANNOT
make a boot disk if your / partition is an LVM due to the modules not
fitting on the floppy disk.
Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist,
Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber,
BMX rider, Walker, Raver & rave music lover, Big kid that refuses
to grow up. I'd make a good family pet, take me home today!
Do people actually read these things?