view · edit · sidebar · attach · print · history

Software Raid's

Building a RAID1 (boot) / RAID5 (root) with ASUS P5GDC-V Deluxe
For the fast and furious:

tools:

  • mdadm
  • jfsutils

Most important steps for /dev/md0

  1. Install Lilo 22.6
  2. mknod /dev/md0 b 9 0
  3. mdadm -Cv /dev/md0 -l1 -n4 -c128 missing /dev/sdb1 /dev/sdc1 /dev/sdd1
  4. mkfs.jfs /dev/md0
  5. umount /boot
  6. mdadm -a /dev/md0 /dev/sda1 -> (4 disks=[UUUU], only possible if /boot not mounted)
  7. mkdir /mnt/newroot
  8. mknod /dev/md1 b 9 1
  9. mount /dev/md1 /mnt/newroot (do not yet hot-add the 4th disk!)
  10. mkdir /mnt/newroot/boot
  11. mount /dev/md0 /mnt/newroot/boot
  12. find . -xdev | cpio -pm /mnt/newroot (do not use: cp -ax / /mnt/newroot!!)
  13. fdisk /dev/sda and make /dev/sda1 and /dev/sda3 "fd"
  14. mount -o bind /dev /mnt/newroot/dev/
  15. mount -o bind /proc /mnt/newroot/proc/
  16. chroot /mnt/newroot /bin/bash/
  17. Edit lilo.conf so boot = /dev/md0
  18. Lilo -x mbr (Thanks John!!)
  19. Edit /etc/fstab
  20. The End: Do not forget to 'fd' /dev/sda1 and /dev/sda3
  21. If you can not mount /dev/md0 redo mkfs.jfs.
  22. Do not forget: To mdadm -a you must boot on md1.
  23. And: Do not forget to create the initial console when you are chrooted in /mnt/newroot:

To see which devices nodes are present before the /dev filesystem is mounted, run the following commands:

  1. mkdir test
  2. mount --bind / test
  3. cd test/dev
  4. ls

The devices needed for a successful boot are /dev/null and /dev/console. If they didn't show up in the previous test, you have to create them manually. Issue the following commands in the test/dev/ directory:

  1. mknod -m 660 console c 5 1
  2. mknod -m 660 null c 1 3

When you're finished, don't forget to unmount the test/ directory:

  1. cd ../..
  2. umount test
  3. rmdir test

Speed Settings for Syncing

  • /proc/sys/dev/raid/speed_limit_min
  • echo 50000 >/proc/sys/dev/raid/speed_limit_min

When having Lilo problems

  1. boot from CD
  2. mknod /dev/md0 b 9 0
  3. mknod /dev/md1 b 9 1
  4. mdadm --assemble --run /dev/md0 /dev/hda1
  5. mdadm -a /dev/md0 /dev/hdc1
  6. mount /dev/md1 /mnt/gentoo
  7. mount /dev/md0 /mnt/gentoo/boot
  8. mount -o bind /dev /mnt/gentoo/dev
  9. mount -o bind /proc /mnt/gentoo/proc
  10. lilo -x mbr

Growing a Software Raid1

  1. mdadm --grow /dev/md1 --size=max - also see http://www.silfreed.net/content/argo-hard-drive-upgrade-growing-raid1-array
  2. Resizing with JFS: # mount -o remount,resize /mount/point - also see http://www.linux.com/articles/32002
view · edit · sidebar · attach · print · history
Page last modified on April 04, 2009, at 08:28 PM