Skip to content

Instantly share code, notes, and snippets.

@SiKing SiKing/raid_check.sh
Created Jan 18, 2017

Embed
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.