Table of Contents

RAID - mdadm - Remove a disk from an array

A disk cannot be removed directly from an array, unless it is failed.


Mark a disk as failed

NOTE: This step is not needed if the disk is already in a failed state.

mdadm --fail /dev/md0 /dev/sda1

Remove the disk from the array

mdadm --remove /dev/md0 /dev/sda1

Fail and Remove a disk in a single step

Both of the above actions can be done in a single step:

mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1