mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2026-11-25 09:26:20 -05:00
Check to see if specification of connection type is necessary.
This commit is contained in:
parent
4feb21a0e1
commit
533ad38bc3
1 changed files with 16 additions and 3 deletions
|
|
@ -221,6 +221,19 @@ if echo "${SMART_info}" | grep "Rotation Rate:" | grep -q "Solid State Device";
|
|||
driveType="ssd"
|
||||
fi
|
||||
|
||||
# Test to see if it is necessary to specify connection type:
|
||||
|
||||
SMART_deviceType="$(smartctl -d test "/dev/${driveID}")"
|
||||
|
||||
if echo "${SMART_deviceType}" | grep -q "Device open changed type"; then
|
||||
if echo "${SMART_deviceType}" | grep -q "[SAT]:"; then
|
||||
driveConnectionType="sat,auto"
|
||||
fi
|
||||
else
|
||||
driveConnectionType="auto"
|
||||
fi
|
||||
|
||||
|
||||
# Form the log and bad blocks data filenames:
|
||||
|
||||
Log_File="burnin-${Disk_Model}_${Serial_Number}-$(date -u +%Y%m%d-%H%M+0).log"
|
||||
|
|
@ -314,7 +327,7 @@ run_short_test() {
|
|||
push_header
|
||||
|
||||
if [ "${Dry_Run}" -eq 0 ]; then
|
||||
smartctl -t short "/dev/${driveID}"
|
||||
smartctl -d "${driveConnectionType}" -t short "/dev/${driveID}"
|
||||
|
||||
echo_str "Short test started, sleeping ${Short_Test_Sleep} seconds until it finishes"
|
||||
|
||||
|
|
@ -341,7 +354,7 @@ run_conveyance_test() {
|
|||
push_header
|
||||
|
||||
if [ "${Dry_Run}" -eq 0 ]; then
|
||||
smartctl -t conveyance "/dev/${driveID}"
|
||||
smartctl -d "${driveConnectionType}" -t conveyance "/dev/${driveID}"
|
||||
|
||||
echo_str "Conveyance test started, sleeping ${Conveyance_Test_Sleep} seconds until it finishes."
|
||||
|
||||
|
|
@ -364,7 +377,7 @@ run_extended_test() {
|
|||
push_header
|
||||
|
||||
if [ "${Dry_Run}" -eq 0 ]; then
|
||||
smartctl -t long "/dev/${driveID}"
|
||||
smartctl -d "${driveConnectionType}" -t long "/dev/${driveID}"
|
||||
|
||||
echo_str "Extended test started, sleeping ${Extended_Test_Sleep} seconds until it finishes"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue