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 Ubuntu Server or ""Install to Hard Disk""

  3. Choose your language, country and keyboard layout
  4. Set hostname: default - ubuntu
  5. Confirm time zone detection.
  6. Partitioning method: "Manual".
    1. RAID1 array for /
    2. RAID1 array for swap
    3. RAID1 array for /home (testing non-rootfs raid)
  7. Select "Yes" to the "boot degraded?" question
  8. User account: enter username and password
  9. No software selection.
  10. Reboot and login.
  11. Make sure that the root and home file systems are mounted from md devices:
    • sudo mount
  12. Make sure that the swap partition is mounted from a md device:
    • 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 cold-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 (note that you may have to wait up to 5 minutes for mdadm to time out and boot into degraded mode):
      • cat /proc/mdstat
    5. Poweroff the system
    6. /!\ If you simply disconnect the first disk (disk1) and reconnect the second disk (disk2) - disk 1 disconnected, disk 2 connected - you risk disk corruption; see bug 557429)

    7. Reconnect the second disk (disk2) - both disks now connected.
    8. Poweron the system
    9. Check that the system boots correctly (there should be no error or delay)
    10. Check the status of the raid arrays:

      cat /proc/mdstat
    11. All arrays should have been assembled completely again, possibly still syncing.
    12. You may have to add any missing devices back to the RAIDs manually. This is not a bug (see bug 791454)! A manual addition would be:

      sudo mdadm --add /dev/mdX /dev/MISSING-DEVICE

      Note that this may fail with a message requiring you to zero the superblock first, this is a result of an added check in mdadm 3.2, and should only happen on precise or later (see bug 943397).

    13. make sure that all disk arrays are synchronized before proceeding, if the array is doing a full re-sync, it may take a few minutes, use

      cat /proc/mdstat
    14. Poweroff the system.
    15. Disconnect the first disk (disk1) - disk 1 disconnected, disk 2 connected.
    16. Poweron the system.
    17. Check that system boots correctly from the degraded RAID1 array on a single disk:
      • cat /proc/mdstat
  17. Test automatic syncing of degraded array:
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
  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 cold-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
  22. Re-add/sync the arrays again
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
    4. Add the missing drives back to the RAIDs:
      • sudo mdadm -a /dev/mdX /dev/MISSING-DEVICE
  23. Test booting from a hot-degraded array:
    1. Remove (unplug/fail) one disk from the running system.
    2. Check if users/admin get a notification message and beep about the failing raid.
    3. Reboot, verify that system comes up degraded without failure. (BOOT_DEGRADED setting bogus, Bug #539597)

File a bug

Server with LUKS on RAID1 install

Case ID: SR1I-002

  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.
    1. RAID1 array for /boot
    2. RAID1 array with LUKS on it for /
    3. RAID1 array for swap (should it get encrypted automatically?)
    4. RAID1 array with LUKS on it for /home
  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 and home file systems are mounted from luks devices:
    • sudo mount
  12. Make sure that the swap partition is mounted from a md device (and encrypted?):
    • sudo cat /proc/swaps
  13. Make sure that the luks devices and /boot use md devices:
    • sudo dmsetup deps
  14. Make sure that the raid arrays are working:
    • cat /proc/mdstat
  15. 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
  16. Make sure that the BOOT_DEGRADED setting is "TRUE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  17. Test booting from a cold-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 (note that you may have to wait up to 5 minutes for mdadm to time out and boot into degraded mode):
      • 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. This results in booting the other half of the array, to see if this array segmentation is detected correctly afterwards. (see Bug #557429)
    7. Poweron the system.
    8. Check that system boots correctly from the degraded RAID1 array on a single disk:
      • cat /proc/mdstat
  18. Test automatic re-syncing of degraded array:
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
  19. Wait for both drives to be back in sync:
    • cat /proc/mdstat
  20. Change "Do you want to boot degraded?" answer to "No":
    • sudo dpkg-reconfigure mdadm
  21. Make sure that the BOOT_DEGRADED setting is "FALSE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  22. Test booting from a cold-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
  23. Re-add/sync the arrays again
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
    4. Add the missing drives back to the RAIDs:
      • sudo mdadm -a /dev/mdX /dev/MISSING-DEVICE
  24. Test booting from a hot-degraded array:
    1. Remove (unplug/fail) one disk from the running system.
    2. Check if users/admin get a notification message and beep about the failing raid.
    3. Reboot, verify that system comes up degraded without failure. (BOOT_DEGRADED setting bogus, Bug #539597)

File a bug

Server with LVM on LUKS on RAID1 install

Case ID: SR1I-003

  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.
    1. RAID1 array for /boot
    2. RAID1 array with LUKS on it, with LVM on it, for /, /swap and /home
  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 and home file systems are mounted from mapper devices:
    • sudo mount
  12. Make sure that the swap partition is mounted from a mapper device:
    • sudo cat /proc/swaps
  13. Make sure that lvm uses luks, and luks is using a md device:
    • sudo dmsetup deps
  14. Make sure that the raid arrays are working:
    • cat /proc/mdstat
  15. 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
  16. Make sure that the BOOT_DEGRADED setting is "TRUE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  17. Test booting from a cold-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 (note that you may have to wait up to 5 minutes for mdadm to time out and boot into degraded mode):
      • 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
  18. Test automatic syncing of degraded array:
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
  19. Wait for both drives to be back in sync:
    • cat /proc/mdstat
  20. Change "Do you want to boot degraded?" answer to "No":
    • sudo dpkg-reconfigure mdadm
  21. Make sure that the BOOT_DEGRADED setting is "FALSE" in /etc/initramfs-tools/conf.d/mdadm:
    • cat /etc/initramfs-tools/conf.d/mdadm
  22. Test booting from a cold-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
  23. Re-add/sync the arrays again
    1. Poweroff the system
    2. Reconnect the first disk (so both are now connected)
    3. Poweron the system
    4. Add the missing drives back to the RAIDs:
      • sudo mdadm -a /dev/mdX /dev/MISSING-DEVICE
  24. Test booting from a hot-degraded array:
    1. Remove (unplug/fail) one disk from the running system.
    2. Check if users/admin get a notification message and beep about the failing raid.
    3. Reboot, verify that system comes up degraded without failure. (BOOT_DEGRADED setting bogus, Bug #539597)

File a bug

Install/ServerRAID1 (last edited 2012-02-29 17:20:46 by clint-fewbar)