|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Leon Harris (leon_at_quoll.com)
Date: Fri Nov 08 2002 - 06:14:01 CST
Hi All.
This is a quick and nasty immunix 7.0 raid1 howto.
It was performed on a A7V133 AMD athlon 1000 Mhz box with 2 Western
Digital 30gig 7200rpm ATA drives WD300 Caviar.
Firstly, look do a dmesg and see that the version of RAID matches the
version of raidtools. The default kernel came with md driver 0.36, the
raid tools only work with md driver 0.90 as immunix ships with 0.90
raidtools. Failure to make these two match caused raid to partially be
set up, but then to fail with massive data loss on reboot.
Next, design your raidtab (in etc raidtab. I chose the following
configuration, YMMV
#########################################
#/boot
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
persistent-superblock 1
chunk-size 8
device /dev/hda1
raid-disk 0
device /dev/hde1
failed-disk 1
#/
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
persistent-superblock 1
chunk-size 8
device /dev/hda2
raid-disk 0
device /dev/hde2
failed-disk 1
.... etc ....
###########################################
Note thae failed-disk 1 lines
3) fdisk /dev/hda and /dev/hde and convert all the linux native
partitions (0x83) to raid autodetect(0xfd) types.
save your changes (type w in fdisk)
4) breath in. check your configs again. Happy?
type mkraid /dev/mdn - where n is one of the devices described in
your /etc/raidtab
(you will get a message about a certain switch needed on the cmd line.
add it to your command. The raid developers have asked documentors not
to describe this in public forums, and I am respecting that here).
5) Check that all is ok. cat /proc/mdstat for each raid device. You
should see
/dev/mdN [2,1] U_
6) edit your raidtab /etc/raidtab
change :
failed-disk 1 to raid-disk 1
for each occurence of failed-disk in the file
7) one by one issue the command
raidhotadd /dev/mdN /dev/hdeN
where N is the number of the partition or raid device
8) wait until the entire array has rebuilt ie
cat /proc/mdstat
shows all [2,2], no [2,1] entries
9) *Now it is time to sort out lilo - don't reboot yet.
A
*
get lilo 22.0-2 or later - earlier versions wont understand this config
(note immunix 7 ships with V21)
set up your lilo as follows
# two disks, hda and hde in software raid 1 mode
#
# NOTE: THIS WAS A BASTARD TO SET UP - SEE LOGBOOK
# BEFORE PLAYING WITH THIS
lba32
boot = /dev/md0
map=/boot/map
raid-extra-boot="/dev/hda, /dev/hde"
delay = 5 # optional, for systems that boot very quickly
vga = normal # force sane state
image = /boot/bzImage-2.2.19-8
label = linux-2.2.19-8
root = /dev/md1
image = /boot/bzImage-2.2.19-3
label = linux-2.2.19-3
root = /dev/md1
Notes:
1. liba32 explicitly tell lilo it is using a big disk
2. put boot record on /dev/md0
*B*
type lilo -t. correct any reported errors
then do lilo -v ( use -v5 if you have to debug -very verbose)
*C*
reboot. Then curse my name when it doesn't work for you. Well, it did
for me :)
if it doesn't go:
Check kernel has raid support, and that you are using the right kernel.
(if you get a kernel panic, unable to mount root fs, the chances are
that that particular kernel doesn't have raid support)
Is the raid array fully rebuilt when you ran lilo - lilo seemed to fail
silently when run on an array run in degraded mode (or it seemed to for
me, I didn't isolate this problem further).
Enjoy, and I hope this helps you. This process was so hellish for me to
figure out, that I sent my wife and child on holiday for 5 days while I
sorted it out. I didn't leave the house during that time except to eat
at McDonalds. I hope you have less stress.
_______________________________________________
Immunix-users mailing list
Immunix-users
mail.wirex.com
http://mail.wirex.com/mailman/listinfo/immunix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]