Make raid set rebuild on spare

From HeepyWiki
Jump to: navigation, search

With linux md raid, sometimes when you remove a failed disk from a set and replace it with a new one, the raid set marks the new drive as a spare and doesn't rebuild. This is particularly common with raid 6 sets. When this happens, look in

/sys/block/mdN/md/sync_action

It may be that the sync state is listed as "frozen" - if this is the case, change it with

echo "idle" > /sys/block/mdN/md/sync_action

and it will start rebuilding the array using the new drive previously marked as a spare.