On Wed 15 Oct 2008 17:10:09 NZDT +1300, [EMAIL PROTECTED] wrote:

> What OS should I used?

Linux. Stupid question ;)

> How easy is it to set up the two disks as RAID1?

A few clicks in yast. Has been like that for donkeys years.

> How does it work?

You need to ensure that grub gets installed on *both* disks. The bios
will then try one of them first. In case one goes faulty, you can of
course still boot from the other one, but you may need to adjust the
bios disk boot order.

> Do I have to make a small boot pat on one of the drives 
> then set up the rest?

Not with raid1. You can boot from a raid1 because both partitions have
identical content, therefore at boot time grub can read the necessary
disk blocks from either disk underneath(!) the raid layer. That's why
you can't boot from a raid2 or a raid5 - you need the raid layer to get
your data back.

The raid disk is always /dev/mdN, whereas the constituent disks may be
/dev/sdaN and /dev/sdbN. Grub reads sd[ab]N. When grub is installed, the
write is to mdN so goes to both disks identically.

> If I do that and the boot drive fails then what?

See above. You take the stuffed disk out, continue working as normal
until the replacement arrives, you stick the replacement back in, done.
Saved my HUGE amounts of hassle several times now, disks have been so
cheap, I wouldn't ever consider running my desktop without raid1.

The other beauty with Linux kernel raid is, apart from needing no
proprietory cr*p drivers (did I say Promise?), that you don't need to
use the whole disks in a raid configuration. The disks don't even need
to be the same size. You can easily use the first 15GB ofeach disk for
/dev/md0 mounted on /, and the next 40GB (or however much you want for
your most precious bits) as /dev/md1 mounted on /home.

In theory, the disk areas used for a raid1 don't even need to be at the
same starting point on both disks, however if they aren't, you won't be
able to boot reliably from that raid1 any more as the grub will run
correctly from at most one of the disks. So possible, but not advisable.

Notes on openSUSE:

The raid configuration works fine, but the grub confirguration is broken
in many cases for 10.x and 11.0. The correct raid1 grub commands (for
any distro) are:

# cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd1) (hd1,4)
setup --stage2=/boot/grub/stage2 (hd0) (hd0,4)
quit

Create this file manually (obviously adjust the numbers and paths for
your disks), then run 

        grub --batch </etc/grub.conf

to install the grub loader on both disks. Backup the file in case a
kernel upgrade overwrites it.

Oh yeah, many other distros[1] have /etc/grub.conf be a symlink to
/boot/grub/menu.conf and are too stupid to save the commands used to
install grub anywhere. In that case the above grub commands will work,
but you're on your own to get your system organised. And if you didn't
have the above commands to start with, you'd have a hell of a time
finding out what to use.

Volker

[1] This includes Debian (or at least the non-latest Debians).

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to