Summary: Forum member @Mugiwara discovered a bug in the
disk-burnin.sh script, which was unable to parse the extended test duration for his 8TB disks. I have modified the script to correct this bug.
Details: The bug had to do with the parentheses delimiting the test durations as they are reported by the
smartctl
command:
Code:
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: (1242) minutes.
The original code implicitly assumed that whitespace would always precede the integer value; but this isn't true for large drives (>= 8TB), which have
very long test durations. I modified the code to remove the parentheses before extracting the integer value:
Code:
# Query the short and extended test duration, in minutes. Use the values to
# calculate how long we should sleep after starting the SMART tests:
Short_Test_Minutes=$(smartctl -c /dev/"$Drive" | pcregrep -M "Short self-test routine.*\n.*recommended polling time:" | sed -e 's/)//;s/(//' | awk '{print $4}' | tr -d '\n')
#printf "Short_Test_Minutes=[%s]\n" ${Short_Test_Minutes}
Extended_Test_Minutes=$(smartctl -c /dev/"$Drive" | pcregrep -M "Extended self-test routine.*\n.*recommended polling time:" | sed -e 's/)//;s/(//' | awk '{print $4}' | tr -d '\n')
#printf "Extended_Test_Minutes=[%s]\n" ${Extended_Test_Minutes}
Nota bene: It will take a very,
very long time to burn-in large disks! The 8TB drives described here will take 1,242 minutes - over 20 hours! - just to run the SMART extended test. The
badblocks
test will take much longer than that to complete.
For large drives such as these, I recommend skipping the extended SMART test before the
badblocks
test, which you can easily do by commenting out the appropriate line of code as shown here:
Code:
# Run the test sequence:
run_short_test
#run_extended_test
run_badblocks_test
run_short_test
run_extended_test