Firstly thank you this script works perfect for my SATA drives.
But it doesn't work for the 2 SAS drives I have in the system because camcontrol command is not found in my system (TrueNAS-SCALE-22.12). As a result, all of the drives are recognised as ATA drives and hdparm won't work on the 2 SAS drives in the system.
The 2 SAS drives are sdh and shi in the log below.
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdk (2d98fd2e-9d1c-4dff-839a-c39bd3da9c4d)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdi (8b66d18e-768f-42de-af32-04cdad0628bb)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdh (fcf00481-9094-467d-9da3-1e8e0942c625)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdl (103e3f90-10ad-4e61-be24-2c81d80ac336)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdg (30a6b455-b559-4511-a9fa-2977c988c0e2)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdm (fe311353-57ed-4f72-9b40-eb079decf189)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdj (cf39023c-5cee-42af-8c4c-0c241a0a1b2e)
[2024-02-05 13:26:14] -> Detected disk in pool tank: sdn (a115a4f5-369f-4e94-a6f8-84165751e6f1)
[2024-02-05 13:26:14] Detected drive sdg as ATA device
[2024-02-05 13:26:14] Detected drive sdh as ATA device
[2024-02-05 13:26:14] Detected drive sdi as ATA device
[2024-02-05 13:26:14] Detected drive sdj as ATA device
[2024-02-05 13:26:14] Detected drive sdk as ATA device
[2024-02-05 13:26:14] Detected drive sdl as ATA device
[2024-02-05 13:26:14] Detected drive sdm as ATA device
[2024-02-05 13:26:14] Detected drive sdn as ATA device
[2024-02-05 13:26:14] Monitoring drives with a timeout of 20 seconds: sdg sdh sdi sdj sdk sdl sdm sdn
[2024-02-05 13:26:14] I/O check sample period: 10 sec
[2024-02-05 13:26:14] Drive timeouts: [sdg]=20 [sdh]=20 [sdi]=20 [sdj]=20 [sdk]=20 [sdl]=20 [sdm]=20 [sdn]=20
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 01 cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 01 cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2024-02-05 13:26:15] Drive power states: [sdg] => 1 [sdh] => 0 [sdi] => 0 [sdj] => 1 [sdk] => 1 [sdl] => 1 [sdm] => 1 [sdn] => 1
Please let me know how to resolve this, thank you!
Firstly thank you this script works perfect for my SATA drives.
But it doesn't work for the 2 SAS drives I have in the system because
camcontrol
command is not found in my system (TrueNAS-SCALE-22.12). As a result, all of the drives are recognised as ATA drives and hdparm won't work on the 2 SAS drives in the system.The 2 SAS drives are
sdh
andshi
in the log below.Please let me know how to resolve this, thank you!