Created
November 8, 2013 17:08
-
-
Save bitfolk/7374253 to your computer and use it in GitHub Desktop.
Use something like this on boot to check that all your SCSI devices either support Error Recovery Control at 7 seconds, or else have a large enough SCSI layer timeout to prevent them being kicked from a RAID array on bad sector reads.
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/sh | |
for disk in `find /sys/block -maxdepth 1 -name 'sd*' | xargs -n 1 basename` | |
do | |
smartctl -q errorsonly -l scterc,70,70 /dev/${disk} | |
if test $? -eq 4 | |
then | |
echo "/dev/${disk} doesn't support scterc, setting timeout to 180s /o\\" | |
echo 180 > /sys/block/${disk}/device/timeout | |
else | |
echo "/dev/${disk} supports scterc \\o/" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment