mdadm cheatsheet

  1. Check raid status
    cat /proc/mdstat
    or
    watch cat /proc/mdstat
  2. Scan configuration
    mdadm --detail --scan

  3. To Remove a disk from the Array, you’ll have to fail then remove the drive.
    mdadm --fail /dev/mdX /dev/sdX
    mdadm --remove /dev/mdX /dev/sdX
  4. To add a disk to the array:
    mdadm --add /dev/mdX /dev/sdX
    • Turn bitmap on
      mdadm --grow --bitmap=internal /dev/mdX
    • Turn off bitmap
      mdadm --grow --bitmap=none /dev/mdX
  5. Speed up recovery
    echo 50000 > /proc/sys/dev/raid/speed_limit_min

Resources

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.