- Reinstall Lilo to the MBR of the raid drives
- I saw the following error after I migrated the / to a raid 1 /dev/md1
setuproot: moving /dev failed No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
It's because the old initrd.img might not invoke the mdadm command or the kernel module for the SATA controller to start the md array before accessing the root file system. This can be verified by
lsinitrd /boot/initrd.img | grep mdadm
lsmod | grep sata
lsinitrd /boot/initrd.img | grep libata
What I did is to reboot with a repair system, and type the following commands:
mount /dev/md0 /mntThen reinstall Lilo if necessary.
mount -n -t sysfs /sys /sys
mv /boot/initrd.img /boot/initrd.backup
mkinitrd -f --preload=libata --preload=scsi_mod /boot/initrd.img 126.96.36.199
- The content of the initrd.img file may be extracted by the following command
gunzip < /boot/initrd.img | cpio -i --make-directories
Check the content of /dev folder before it's mounted as /dev. If there are any md* entries, delete them. Otherwise it may not boot successfully.
- The libary package was in compatible with the upgraded e2fsprogs package. But the partition only needed check because the maximum mount count was exceeded. So in the "Repair Filesystem" mode, root can do the following:
- disable the fsck on a partition by running the command
dumpe2fs -h /dev/hda1 | grep 'ount count'
tune2fs -c 0 -i 0 /dev/hda1
Reboot and no fsck error whatsoever.
- Remount the / to read and write
mount -o remount,rw /
- Create the software raid 1 with two sata drives
- mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
- Run diskdrake to set the mount point for /dev/md0 and mount it
- mdadm --examine --scan /dev/sda1 >> /etc/mdadm.conf
- Change the partition label with e2label /dev/md0 /home
- Manually start the array with mdadm -As /dev/md0
- Add auto=yes to the end of every ARRAY clause in /etc/mdadm.conf
- Add HOTPLUG_RC_scsi=yes into /etc/sysconfig/hotplug