Install/ServerRAID1

Not logged in - Log In / Register

Server RAID1 Install

Server basic RAID1 install

Case ID: SR1I-001

  1. Boot CD and run the CD self-check (then reboot)
  2. Select Install to hard disk

  3. Choose your language, country and keyboard layout
  4. Set hostname: default - ubuntu
  5. Partition disks: Custom partition scheme. Setup 1 RAID1 array for / and 1 RAID1 array for swap
  6. Select "Yes" to the "boot degraded?" question
  7. Select your time zone and set the system clock to UTC
  8. User account: enter username and password
  9. No software selection.
  10. Reboot and login.
  11. Make sure that the root file system is mounted from /dev/md0 (or /dev/md1):
    • sudo mount
  12. Make sure that the swap partition is mounted from /dev/md1 (or /dev/md0):
    • sudo cat /proc/swaps
  13. Make sure that the raid arrays are working:
    • cat /proc/mdstat
  14. Make sure that grub has been installed on both disks:
    • sudo apt-get install -y binutils
      for i in $(sudo mdadm -Q --detail $(df -P /boot | grep ^/dev/ | cut -d" " -f1) | grep " /dev/" | awk '{print $NF}' | sed -e 's/[0-9]$//'); do sudo dd if=$i bs=512 count=1 2>/dev/null | strings -a | grep -q GRUB && echo $i: ok || echo $i: FAIL; done
  15. Make sure that the BOOT_DEGRADED setting is "TRUE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  16. Test booting from a degraded array:
    1. Poweroff the system
    2. Disconnect one of the disk (disk 2) - disk 1 connected, disk2 disconnected.
    3. Poweron the system
    4. Check that system boots correctly from the degraded RAID1 array on a single disk:
      • cat /proc/mdstat
    5. Poweroff the system
    6. Disconnect the first disk (disk1) and reconnect the second disk (disk2) - disk 1 disconnected, disk 2 connected.
    7. Poweron the system.
    8. Check that system boots correctly from the degraded RAID1 array on a single disk:
      • cat /proc/mdstat

      NB: A more exhaustive set of test instructions to be used in KVM environments can be found on the BootDegradedRaid wiki page

  17. Add the missing drive back to the RAID:
    • sudo mdadm -a /dev/md0 /dev/MISSING-DEVICE
  18. Wait for both drives to be back in sync:
    • cat /proc/mdstat
  19. Change "Do you want to boot degraded?" answer to "No":
    • sudo dpkg-reconfigure mdadm
  20. Make sure that the BOOT_DEGRADED setting is "FALSE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  21. Test booting from a degraded array:
    1. Poweroff the system
    2. Disconnect one of the disk (disk 2) - disk 1 connected, disk2 disconnected.
    3. Poweron the system
    4. Check that on boot a question to enable and boot from a degraded array is asked.
    5. Say yes
    6. Check that system boots correctly from the degraded RAID1 array:
      • cat /proc/mdstat
    7. Poweroff the system
    8. Disconnect the first disk (disk1) and reconnect the second disk (disk2) - disk 1 disconnected, disk 2 connected.
    9. Poweron the system.
    10. Check that on boot a question to enable and boot from a degraded array is asked.
    11. Say yes
    12. Check that system boots correctly from the degraded RAID1 array:
      • cat /proc/mdstat

Install/ServerRAID1 (last edited 2009-10-28 16:49:28 by Kees Cook)