Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Check all raid arrays for errors.
#!/bin/bash -e
#
# Check all raid arrays for errors.
#
# Inspiration:
# https://wiki.archlinux.org/index.php/RAID#RAID_Maintenance
#
echo "Are we superuser?"
[[ $EUID -eq 0 ]]
echo "OK"
echo "Initiate all RAID checks."
for block in /sys/block/md*
do
echo check > $block/md/sync_action
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment