I have managed to bulid a system that is using a RAID1 root file system. 
Here are some observations and comments on the whole experiance.

I am running raidtools-19981005-B-0.90 and 2.1.124 patched with 
raid0145-19981005-C-2.1.124. I have also hacked together an RPM for 
raidtools-19981005-B-0.90 but it still needs a little work.

Root raid(1) works with MILO for booting since MILO only reads the disk 
on boot and since with RAID1 the disk image is unaltered from what a 
normal disk all is ok. This by the way is what Sun supports with there 
own software raid solution.

System booting seems to be no problem and quite reliable. I have been 
able to boot from both drives. Halting the system requierd some work 
though since it seems that raidstop --all will not stop all the drives in 
use. I also was under the impression that the root partition would be 
stopped as part of the halt/reboot sequence. I managed to resolve these 
problems by using raidstop --readonly /dev/mdX for all of the running 
devices. 

The biggest problem I had was building the root partition. I ended up 
installing linux on a different partition and then installing the 
raidtools to build a raid1 set and then dump/restoring the installed root 
partition onto the new raid1 partition. This was a bit of a pain since I 
like to have one large partition instead of several smaller ones. 

My first try was to create a raid1 set that had only one disk in it and 
then dump/restore the installed parttion over to the new raid1 set. After 
the set was created I would raidaddhot the original disk to the set. This 
did not work. What is needed here is the ability to adjust the 
configuration of a raid set after is is built or the ability to create a 
raid set with some drives marked as bad so they will not be used when the 
set is created.

The process that would be workable is to:
1) install your system on sda1
2) install raidtools
3) create a raid1 md0 set with sdb1 and sda1 but sda1 is marked as bad.
4) mkfs on md0
5) dump/restore sda1 to md0
6) reboot from sdb1 with root=/dev/md0
7) raidaddhot sda1 to md0
8) we now have working root raid1 system.

An alternate solution would be to:
1) install your system on sda1
2) install raidtools
3) shrink the fs on sda1 to match the size the will be left after 
   applying mkraid.(I am not sure how much this will screw up the FS)
4) create a raid1 md0 set with sda1 and sdb1 but sdb1 is marked as bad
5) reboot from sda1 with root=/dev/md0
6) raidaddhot sdb1 to md0
7) we now have a raid1 root with one less step.

The second plan is somewhat like what Sun does to create a root raid on a 
running system, with the exception of the FS srhink since they save there 
control information in an other place on the disk.

I have yet to do extensive testing on the system but after a couple of 
days It still seems stable so I am hopefull.

Alvin Starr                   ||   voice: (416)585-9971
Interlink Connectivity        ||   fax:   (416)585-9974
[EMAIL PROTECTED]              ||

Reply via email to