Created
January 18, 2017 18:28
-
-
Save SiKing/f7301a9e29af32ad3feffd4c174d4232 to your computer and use it in GitHub Desktop.
Check all raid arrays for errors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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