I have a CentOS 5 server with 2 drives (/dev/sda and /dev/sdb). It was originally setup without RAID (/dev/sdb was blank). I've gone through the process of configuring the second drive, setting up the raid, etc. When I try to boot the RAID, it hangs with the following message:
-----
mount: could not find filestystem '/dev/root'.
Setting up other filesystems
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init
unmounting old /dev/
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init
-----
Here's a summary of what I did to setup the RAID:
1) copy the partition table from /dev/sda to the secondary drive /dev/sdb
2) change the partition types to 'Linux raid auto'
3) create RAID 1 arrays (/dev/md1 as boot, md2 as swap, md3 as root)
4) Format filesystems (md1 and md3) and create the swap space (md2)
5) Rebuild initrd image to include raid1 (mkinitrd -v --preload=raid1 /root/initrd-2.6.18-53.1.1
9.el5.raid
1.img 2.6.18-53.1.19.el5)
6) Modify /boot/grub/grub.conf and add the new boot option using the image just created:
title CentOS (2.6.18-53.1.19.el5) RAID1
root (hd1,0)
kernel /vmlinuz-2.6.18-53.1.19.el
5 ro root=/dev/md3
initrd /initrd-2.6.18-53.1.19.el5
.raid1.img
7) Mount the raid devices (/dev/sda1 (boot) and /dev/sda3 (root))
8) Copy the contents of /dev/sda[1,3] to /dev/md[1,3] which are mounted on /mnt/md[1,3] (using 'cp -a' to preserve everything)
9) Install grub on /dev/sdb (grub-install /dev/sdb) so that later the second drive can boot in the event the first drive fails.
10) Update /etc/fstab on /dev/md3 to use the raid devices (/dev/md[1,2,3]) instead of /dev/sda[1,2,3]
11) Reboot. At the grub menu, select the RAID option created earlier.
Any ideas of where to go next?
Start Free Trial