[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

make a raid-1 with 2 disks



Hello. I've stucked with this scenario. I've read the howtos and the
documentation 10-15 times, but it did not help :(

All i wanna do (is have some fun), to create a mirror disk system (raid1),
so, if one of the disks fail, the other can easily (and _automatically_)
boot up.

the config is: two PIII 800, 512 megabytes of memory, abit vp6 board, and 2
40 Gb quantum disks (unfortunatelly, this is not my machine:))

I did the following steps (as described in the root+boot+raid howto):

created partitions:
hda1: 15 Mb for boot (partition type linux native)
hda2: 128 Mb for swap  (swap)
hda3: the remaining space (linux native)

hdc is just the same.

installed a fresh system on hda3. i got the kernel (2.2.18), and the raid
patch for 2.2.18. after some pretty compiling (raid-1 is in the kernel), i
rebooted the host.

created the /etc/raidtab file:
raiddev    /dev/md0
raid-level            1
nr-raid-disks       2
chunk-size          32
nr-spare-disks     0
persistent-superblock    1
device     /dev/hdc3
raid-disk       0
device    /dev/hda3
failed-disk     1

modified the partition type for hdc3 to linux raid autodetect (`fd' in
fdisk)
i typed to command line:
mkraid /dev/md0
mke2fs /dev/md0
mount /dev/md0 /mnt

ok, i succesfully created a filesys on /dev/md0. now, i copied all of my
files (except /proc and /mnt) to the newly mounted location to /mnt.

unmounted the devices, then umounted /boot also, and did a dd if=/dev/hda
of=/dev/hdc blocks=512 count=1
dd if=/dev/hda1 of=/dev/hdc1
(to copy the /boot partition to hdc1, so, the system could boot from hdc)

ok then. Now what? the doc says, reboot. but if i reboot, nothing happens.

thanks for any help,
Daniel




Reply to: