At 12:37 1998/10/13 +0100, Bruno Prior wrote:
>Briefly, to summarize the steps you need to take:
>
>In raidtools-0.90: ./autogen.sh; make; make install; make install_dev
>
>Create /etc/raidtab (you can base this on raidtab.sample in raidtools-0.90)
>
>mkraid -f /dev/md* (to initialize the RAID devices. Do each md device
>separately, don't type md* literally. This destroys all data on constituent
>partitions.)
>
>fdisk each disk with partitions which will be included in a RAID device, and
>set those partitions to type 0xfe
>
>Use tar to copy whichever bits of the existing filesystem you want to move
>to the RAID devices (I assume you want to do this as you were looking at
>Root-RAID)
>
>Edit /etc/fstab (or RAID-root/mountpoint/etc/fstab if you are switching to
>root-RAID) to indicate mountpoints of RAID devices (remember the kernel
>cannot be on a RAID0/4/5 partition, so you will probably want a small
>unRAIDed /boot partition for your kernel images)
>
>If you are switching to root-RAID, edit /etc/lilo.conf so that root points
>to the RAID device, then run lilo.
>
>Reboot. You should be in business.
I fail to catch up with some of the above Bruno's instructions as I am too
slow.
I have 1 running IBM disk (/dev/sda) and 3 to-be-raided Seagate (/dev/sdb,
/dev/sdc, and /dev/sdd). All are connected to AHA 2940U/WB. I have built
RAID5 kernel based on Slackware in the running sda disk and rebooted.
My goal is to:
1. have ada retired.
2. create RAID5 from sdb2, sdc2, sdd2.
3. place zImage in sdb1.
sdb1/zImage is the real boot image.
4. have the minimum number of files/directories in sdb1 in order to gain
the maximum benefit of RAID.
5 mount /dev/md0 as root file system (/).
What I have successfully done are:
1. fdisk /dev/sdb:
change id to 0xfd (as suggested by Martin Galant)
create sdb1, size = 1MB
create sdb2, size = 4.5GB
fdisk /dev/sdc:
change id to 0xfd (as suggested by Martin Galant)
create sdc1, size = 1MB
create sdc2, size = 4.5GB
fdisk /dev/sdd:
change id to 0xfd (as suggested by Martin Galant)
create sdd1, size = 1MB
create sdd2, size = 4.5GB
2. mke2fs -c /dev/sdb1
mke2fs -c /dev/sdc1
mke2fs -c /dev/sdd1
mount -t ext2 /dev/sdb1 /mnt
cp /zImage /mnt
umount /mnt
3. vi /etc/raidtab:
raiddev /dev/md0
raid-level 5
nr-raid-disks 3
nr-spare-disks 0
chunk-size 16
device /dev/sdb2
raid-disk 0
device /dev/sdc2
raid-disk 1
device /dev/sdd2
raid-disk 2
4. mkraid -f /dev/md0
mke2fs -c /dev/md0
5. mount -t ext2 /dev/md0 /mnt
tar -pzc bin boot etc home lib root sbin shlib usr var >/mnt/all.tgz
cd /mnt
tar -xzf all.tgz
6. vi /mnt/etc/fstab:
/dev/md0 / ext2 defaults 1 1
none /proc proc defaults 0 0
7. vi /mnt/etc/lilo.conf:
boot=/dev/sdb1
message=/boot/boot_message.txt
prompt
timeout=60
vga=normal
image=/zImage
root=/dev/md0
label=Linux
read-only
Oooooops! Then, I don't know how to proceed! My problems arise all because
I can not put zImage in RAIDed partition and expect the system to boot from
it.
My problems are:
1. If I tell AHA-2940U/WB that I want disk 1 (ie., sdb) as the boot disk,
can it boot? Remember I have sdb1 unRAIDed and sdb2 RAIDed. Can the SCSI
adapter know which partition to load boot codes?
2. Now that I booted from sda, can I issue command "lilo" right now?
3. I know if the system can boot somehow, it can not see the RAID before
command
/sbin/raidstart -a
is issued. Sure I can put this command in rc.S. But, where should I put
etc/*? In sdb1 or md0 or nowhere?
4. I have nothing in /mnt/dev/. How do I create /mnt/dev/md0 and the other
devices like console, sda, sdb, hda... ? Can I run /mnt/dev/MAKEDEV ...
right now?
I wonder my goal might not be appropriately set. Can anyone adjust it for
me and provide the step-by-step procedures like I wrote?
Thank you all!
CN