Mail Server Surgery


Subject: Mail Server Surgery
From: Jim Wadell (jsw@wadell.org)
Date: Sat Jan 31 2004 - 18:32:59 AKST


Those of you at the meeting were treated to my running commentary,
mostly unprintable, on my attempts to revive my mail server and convert
to raid1 after a disk failure. Though I might take the time to document
my final success.

The box is a stripped RH8 install, and most of the problems were with
getting the thing to boot. The box has 3 disks. /dev/hda was dying.
/dev/hdb was ok, as was /dev/hdc.
Fired up Knoppix and dumped the partations /boot / /var and /usr to save
sets on hdb.
Replaced hda, and fired up Knoppix again.

partitioned /dev/hda1 as /boot, /dev/hda2 as swap /dev/hda3 as extended
the rest of the disk.

/dev/hdc1 swap /dev/hdc2 extended as rest of the disk. Created and
started raid1 on partiton 5 for /, 6 for /usr and 7 for /var. Mounted it
all, and restored my dump files. Booted with no joy, init failed. Cussed
a lot.

Today, I started looking at my desktop machine, and fixed /etc/raidtab a
bit, but still no luck. Clearly, initrd was not working right.

I then copied the initrd on the working machine to /tmp:

cp /boot/xxx.img /tmp/a.tgz
gzip -d a.tgz
mount -o loop a /mnt

cd /mnt, and look at linuxrc. The startup was doing a

startraid /dev/md0, md1 and md2, and an insmod raid1, which was not
happening in the machine I was trying to fix, even though I had build a
new initrd with the initrd script. I then opened up and mounted the
initrd from the box I was trying to fix, corrected the linuxrc script to
load the raid1 module, and start the raid devices. In addition, I had to
make the /dev/md0,1, and 2 devices

mkdev md0 b 9 0

etc.

Unmounted the loop device, compressed the file, and moved it back to
/boot. Booted! It now works!

If you are running any distribution that uses an initrd boot structure,
you might want to take a look at the initrd file by uncompressing and
mounting a COPY. It is instructive!

Jim

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Sat Jan 31 2004 - 18:33:24 AKST