Software raid - mdadm

From Skytech
Revision as of 09:27, 12 August 2012 by Martin (talk | contribs) (Created page with "Category:Linux = Force check of a software raid = <pre> echo "check" > /sys/block/md0/md/sync_action </pre> = Force create a new raid array with no spared (in case of ex...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Force check of a software raid

echo "check" > /sys/block/md0/md/sync_action

Force create a new raid array with no spared (in case of existing data from previos raid)

Assuming Raid 5 using 3 drives: sda1 - sdc1 - sdd1 First we overwrite the superblock

mdadm --zero-superblock /dev/sd[acd]1

Then re-create the array using the --assume-clean

mdadm --create /dev/md1 --assume-clean --verbose --level=5 --raid-devices=3 /dev/sda1 /dev/sdc1 /dev/sdd1

Possible force-check the array if needed with the above.