Mdadm

From Useful Things
Revision as of 12:41, 22 March 2015 by Milosivanovic (talk | contribs) (Created page with "== Remove a drive from an active array == <pre> mdadm --manage /dev/md0 --fail /dev/sdX # set the drive as failed mdadm --manage /dev/md0 --remove /dev/sdX # remove the drive...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Remove a drive from an active array

mdadm --manage /dev/md0 --fail /dev/sdX # set the drive as failed
mdadm --manage /dev/md0 --remove /dev/sdX # remove the drive from the array

Add a drive to an active and degraded array

mdadm --manage /dev/md0 --add /dev/sdX # add the drive

Check array status

Both cat /proc/mdstat and mdadm --detail /dev/md0 have detailed output about configured arrays.