fai and software RAID

Devlin devlin at softhome.net
Tue Jul 9 19:12:31 CEST 2002


My systems use a similar algorithm based on yours.  But I'm having a bit 
of trouble with the order of commands.  I'm running fai 2.3.1.  I wonder 
if anybody's seen something like this:

setup_harddisks partitions the disks
setup_harddisks mkfs's the /dev/[sh]d?? partitions
the hook mkraid's the /dev/md? devices
the /dev/md? devices start to resync
time passes
they finish resyncing
(I manually raidstop my root, them mkraid it, and mkfs it)
the system finishes fai and reboots

If I don't do the part in parentheses, and let the hook handle 
everything, root gets mounted, but fsck complains that the filesystem 
reports its size as larger than the /dev/md? device's size.
If I do that in parentheses, my system will boot and root off the the 
RAID, but fsck complains likewise about any other /dev/md? devices.

It seems that I need to mkraid after partitioning, but before mkfs.  
setup_harddisks doesn't let me do this.

Should I completely rewrite setup_harddisks, or break it into seperate 
tasks, or...?

___
...> I have built a FAI kernel which includes RAID-1
 > support, and have a 'partition' hook script which (crudely) parses a
 > configuration script, shells out to setup_harddisks to partition the 
disks
 > identically, creates a raidtab in /etc and /tmp/target/etc, runs 
mkraid to
 > create the RAID devices, creats /etc/fstab, and creates the diskvar 
file
 > which is ordinarily created by setup_harddisks.
 >
 > Thus, the RAID creation is simply incorporated into the usual FAI 
process,
 > with no extra reboots needed.
 >
 > The "config file" format is not very well-featured yet, and far from
 > flexible, and I'm not sure how well this script interacts with the 
latest
 > versions of FAI -- I began writing it several revisions ago, and don't 
know
 > if my requests to keep FAI compatible have been fulfilled.
 >
 > But I can send you a copy, as a starting point for your own work, if 
you
 > like.



More information about the linux-fai mailing list