[NTLUG:Discuss] Software RAID-1 success and questions.
Richard Geoffrion
ntlug at rain.lewisville.tx.us
Thu Jun 27 09:16:43 CDT 2002
Well, I've stumbled my way through the briar patch yesterday and managed to
get a
fresh install of slack 8.1 on a system with two drives using software
RAID-1.
I won't admit to understanding how why it worked, but I can tell you the
steps.
I wouldn't mind commentary from those in the know. I ask some questions down
towards the bottom. Until I can put together a detailed descriptions of how
I did this I'll run through the steps in 'brief' mode.
Hardware
IBM 300PL Pentium II 333/Mhz w/64 Meg RAM
a 13.6 Gig Fujitsu IDE drive (/dev/hda)
a 13.0 Gig Quantum IDE drive (/dev/hdc)
an IDE CDROM drive (/dev/hdd)
1. Booted with the bare.i kernel (Yes, it supports /dev/md* devices!)
2. cfdisk'ed both my hard drives to make them look like...
{hda}
/dev/hda1 - 131Meg swap (type = 82)
/dev/hda2 - 30 Meg /boot (type = FD)
/dev/hda5 - 2 Gig / (type = FD)
/dev/hda6 - 4 Gig /usr (type = FD)
/dev/hda7 - 6.6 Gig /home (type = FD)
/dev/hda8 - 600 Meg /cache (type = 83)
{hdc}
/dev/hdc1 - 131Meg swap (type = 82)
/dev/hdc2 - 30 Meg /boot (type = FD)
/dev/hdc5 - 2 Gig / (type = FD)
/dev/hdc6 - 4 Gig /usr (type = FD)
/dev/hdc7 - 6.6 Gig /home (type = FD)
3. Manually created an /etc/raidtab file to include
raiddev /dev/mdX
raid-level 1
nr-raid-disks 2
chunk-size 32
nr-spare-disks 0
persistent-superblock 1
device /dev/hdcY
raid-disk 0
device /dev/hdaY
raid-disk 1
{where X equals the /dev/md device number and Y equals the partition number}
4. Issued the 'mkraid /dev/mdX' command {where X equals the /dev/md device
number) for each raid partition.
5. Began the Slack install as normal
6. Added Swap partitions and formated /dev/hda8 as my / (root) partition
using RieserFS.
7. Opened second terminal so that I could move /dev/hda8 off of the /mnt
mount point. (created /cache mountpoint and mounted it there)
8. Manually formatted each of the /dev/mdX partitions ( 'mkreiserfs
/dev/md0' etc...)
9. Created /boot, /usr, and /home and mounted each /dev/mdX partition in the
proper place.
10. Copied everything from the /cache partition to /mnt
11. Manually edited the files in /mnt/var/log/setup/tmp to match my RAID
install settings. (Edited the SeTnative file to include needed /etc/fstab
entries)
12. Flipped back to the original terminal and continued the installation.
13. Upon reaching the LILO configuration screen I installed lilo into the
MBR.
14. Finished the setup script and manually edited /mnt/etc/lilo.conf to show
the boot drive as /dev/md0 and the root partition as /dev/md1
15. Reran 'lilo -r /mnt' to put the changes into effect and received a
warning that lilo had updated /dev/hdc !!!
Well duh! /dev/hdc IS my primary drive in the RAID array...but it's not the
boot drive...hmm...
I tried rebooting anyway but I didn't get past the L in LILO. So I took
step number
16. Modified my BIOS entries to boot off of 'Hard Drive 2'
Now the system is up and mirrored. PHEW!
I think I really screwed myself earlier when I did the unthinkable and
repartitioned the hard drive without stoping the raid devices first. I
still haven't figured out how to get rid of the persistent-superblock
settings once set. I tried repartitioning to no avail. I finally used
'fdisk /mbr' from a Win98 install CD to wipe the drives. THAT WORKED!
I may tear down the system today, redo the drives and start over again.
Of course since the system is not bootable from 'hard drive 0' it's really
not too fault tolerant! UG!
**** Questions below ****
So how does one clean information off of a superblock? What would happen if
I just swaped /dev/hda and /dev/hdc? How does one make TWO bootable IDE
drives and have each of them boot up the same linux system?
Any comments or suggestions?
-Richard
More information about the Discuss
mailing list