[CentOS] mdadm problem.
David.Mackintosh at xdroop.com
Tue Sep 25 16:44:41 UTC 2007
So I'm trying to RAID-1 this system which has two identical disks
installed in it, and it isn't working for some reason.
I started by doing a CentOS-4 install on /dev/sda1 as root, and with
/dev/sda2 as my swap.
I finish the install, yum update, and then I want to make the mirrors.
I copy the partition table from one disk to the other:
# sfdisk -d /dev/sda | sfdisk /dev/sdb
I create my metadevices:
# mdadm -Cv -l1 -n2 /dev/md1 /dev/sdb1 missing
# mdadm -Cv -l1 -n2 /dev/md2 /dev/sdb2 missing
I create my filesystems:
# mkfs.ext3 /dev/md1
# mkswap /dev/md2
I change the /etc/fstab to use /dev/md1 for / and /dev/md2 for swap.
I change the /etc/grub.conf to use /dev/md1 for the root= parameter on my kernel.
I build myself a new initrd for the kernel I want to boot.
I copy the contents of / over to the one-armed mirror:
# cd /
# mnt /dev/md1 /mnt/md1
# tar cfpl - . | ( cd /mnt/md1 ; tar xfp -)
# umount /mnt/md1
I run grub just in case:
> device (hd0) /dev/sda
> root (hd0,0)
> setup (hd0)
I reboot, expecting that the system will find /dev/md1 and use it as
its root... but it doesn't. Digging around in hobbled mode (changing
the root= parameter in grub to /dev/sda1 instead of /dev/md1) shows
that /dev/md1 doesn't get assembled, therefore it doesn't get mounted.
Can anyone tell me what I've done wrong?
/ /()\ \ David Mackintosh |
dave at xdroop.com | http://www.xdroop.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20070925/567685d2/attachment.bin
More information about the CentOS