Opened 3 years ago
Last modified 2 years ago
#1586 new enhancement
DEVICESCAN -d standby could work for SCSI & SAS devices too — at Initial Version
Reported by: | tconnors | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | unscheduled |
Component: | smartd | Version: | |
Keywords: | scsi | Cc: |
Description
smartd.conf(5) says "-n POWERMODE" only works on ATA. My testing shows this might be true, even though smartctl(8) shows "-n POWERMODE" has experimental support for SCSI.
Either way, it shouldn't be too hard to make it work in the generic case. sdparm has a way to detect when a SCSI and SAS disk is spun down:
tconnors@pve:~$ for i in /dev/sd[b-gi-z] ; do echo $i ; sudo sdparm --command=sense $i ; done
/dev/sdb
/dev/sdb: SEAGATE ST4000NM0023 XMGJ
/dev/sdc
/dev/sdc: SEAGATE ST4000NM0023 XMGJ
/dev/sdd
/dev/sdd: SEAGATE ST6000NM0095 DS22
/dev/sde
/dev/sde: SEAGATE ST4000NM0023 XMGJ
/dev/sdf
/dev/sdf: SEAGATE ST6000NM0095 DS22
/dev/sdg
/dev/sdg: TOSHIBA MG04SCA60EE DR07
/dev/sdi
/dev/sdi: ATA WDC WD10EAVS-32D 1A01
tconnors@pve:~$ for i in /dev/sd[b-gi-z] ; do echo $i ; sudo sg_start -r --pc=3 $i & done ; wait
/dev/sdb
[1] 1840017
/dev/sdc
[2] 1840018
/dev/sdd
[3] 1840019
/dev/sde
[4] 1840020
/dev/sdf
[5] 1840021
/dev/sdg
[6] 1840022
/dev/sdi
[7] 1840023
Illegal request
START STOP UNIT command failed
sg_start failed: Illegal request
tconnors@pve:~$ for i in /dev/sd[b-gi-z] ; do echo $i ; sudo sdparm --command=sense $i ; done
/dev/sdb
/dev/sdb: SEAGATE ST4000NM0023 XMGJ
Additional sense: Standby condition activated by command
/dev/sdc
/dev/sdc: SEAGATE ST4000NM0023 XMGJ
Additional sense: Standby condition activated by command
/dev/sdd
/dev/sdd: SEAGATE ST6000NM0095 DS22
Additional sense: Standby condition activated by command
/dev/sde
/dev/sde: SEAGATE ST4000NM0023 XMGJ
Additional sense: Standby condition activated by command
/dev/sdf
/dev/sdf: SEAGATE ST6000NM0095 DS22
Additional sense: Standby condition activated by command
/dev/sdg
/dev/sdg: TOSHIBA MG04SCA60EE DR07
Additional sense: Standby condition activated by command
/dev/sdi
/dev/sdi: ATA WDC WD10EAVS-32D 1A01