From mboxrd@z Thu Jan 1 00:00:00 1970 From: dmason at sarg.ryerson.ca (Dave Mason) Date: Sun, 30 Oct 2005 09:14:18 -0500 Subject: Putting ROOT on RAID for AC1 In-Reply-To: <20051029023738.2794073DCB@hormel.redhat.com> References: <20051029023738.2794073DCB@hormel.redhat.com> Message-ID: <20051030141418.E4F4F83836@sarg.ryerson.ca> I installed AC1 (in late June), but I wanted to get as much as possible on RAID and LVM. What I ended up with is: Filesystem 1K-blocks Used Available Use% Mounted on /dev/md2 9621816 6565816 2567228 72% / /dev/hda1 101114 16573 79321 18% /boot none 383048 0 383048 0% /dev/shm /dev/mapper/raid-home 25803068 8129008 16363340 34% /home /dev/mapper/raid-software 15481840 129276 14566132 1% /software I couldn't get /boot on RAID1, despite quite a lot of trying. Also, the installation didn't let me put / on RAID1, so I had to do quite a lot of messing around. In particular I had to make my own initrd. Here's a diff from the original. Note that this is a bit non-standard. That's because what was documented to work didn't... ; diff orig-init initrd/init 12a13 > mknod /dev/md2 b 9 2 27c28 < raidautorun /dev/md4 --- > /sbin/mdadm -A /dev/md2 --auto --run /dev/hdd2 There were a few other things that had to be done, so here is the update-init that I wrote that creates a new initrd from the original after fixing up a few things: -------- #! /bin/sh mkdir -p /root/initrd cd /root/initrd rm -rf * zcat init < /proc/sys/kernel/hotplug echo "Loading dm-mod.ko module" insmod /lib/dm-mod.ko echo "Loading raid1.ko module" insmod /lib/raid1.ko echo "Loading jbd.ko module" insmod /lib/jbd.ko echo "Loading ext3.ko module" insmod /lib/ext3.ko /sbin/udevstart /sbin/mdadm -A /dev/md2 --auto --run /dev/hdd2 echo Creating root device mkrootdev /dev/root umount /sys echo Mounting root filesystem mount -o defaults --ro -t ext3 /dev/root /sysroot mount -t tmpfs --bind /dev /sysroot/dev echo Switching to new root switchroot /sysroot umount /initrd/dev EOF find *| cpio -c -o | gzip -9 >/boot/initrd-2.6.11-1.1180axp_FC3.md2 -------- My fdisk /dev/hda looks like: Detected an OSF/1 disklabel on /dev/hda, entering disklabel mode. 4 partitions: # start end size fstype [fsize bsize cpg] a: 2 14 13 ext2 b: 15 1231 1217 ext2 c: 1 9733 9733 unused 0 0 d: 1232 9733 8502 fd I really should have given you this a long time ago, because I no longer remember all the things that I tried and what didn't work. I *can* say that it was a frustrating couple of days. I'd be happy to try to answer any questions, though. ../Dave