help with raid and fai
Federico Sevilla III
jijo at free.net.ph
Tue Sep 13 18:33:07 CEST 2005
On Tue, Sep 13, 2005 at 11:36:26AM -0400, Barry L Britt wrote:
> I've been searching through the lists and through Google looking for
> the modified setup_harddisks script written by Sam Vilian. Does anyone
> know where I can find this script?
I don't know if I've changed anything since I first got a copy of the
script I use to implement software RAID using FAI, but here's a copy of
the script I use.
$ cat hooks/partition.FAIBASE
#!/bin/sh -x
# Create partitions
(setup_harddisks -d -X > $LOGDIR/format.log 2>&1)
cat $diskvar
# Change partition types to Software RAID
sfdisk --change-id /dev/hda 1 fd
sfdisk --change-id /dev/hdc 1 fd
sfdisk --change-id /dev/hda 2 fd
sfdisk --change-id /dev/hdc 2 fd
# Create RAID arrays
# Use missing parts for speed enhancement
# Arrays are completed in FAIBASE/S99last
mdadm --create --level=1 --raid-disks=2 --run /dev/md0 /dev/hda1 missing
mdadm --create --level=1 --raid-disks=2 --run /dev/md1 /dev/hda2 missing
# Create filesystem and swap
mkfs.xfs -f -l size=32768b -L ROOT /dev/md0
mkswap /dev/md1
# Replace diskvar with new information
cat > $diskvar << EOF
BOOT_DEVICE=/dev/hda
ROOT_PARTITION=/dev/md0
BOOT_PARTITION=/dev/hda
SWAPLIST="/dev/md1"
EOF
# Replace fstab with new information
cat > /tmp/fai/fstab << EOF
# /etc/fstab: static filesystem information.
#
#<filesys> <mount point> <type> <options> <d p>
/dev/md0 / xfs rw,noatime,logbufs=8,logbsize=32768 0 0
/dev/md1 none swap sw 0 0
none /proc proc defaults 0 0
EOF
--> Jijo
--
Federico Sevilla III : jijo.free.net.ph : When we speak of free software
GNU/Linux Specialist : GnuPG 0x93B746BE : we refer to freedom, not price.
More information about the linux-fai
mailing list