Created
July 27, 2025 23:19
-
-
Save reboot81/a07506c5be857d89f540fd0427d768b5 to your computer and use it in GitHub Desktop.
Unraid awake if Parity-Check in progress
This file contains hidden or 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
# Abort sleep if a parity check is in progress | |
if awk -F= '/mdResync(Pos|Size)/ { a[$1]=$2 } END { exit !(a["mdResyncSize"] > 0 && a["mdResyncPos"] < a["mdResyncSize"]) }' /proc/mdstat; then | |
logger "Parity check in progress – skipping sleep" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment