deajan / smartmontools-win

smartmontools for windows package providing automated / mass installation and email alert support out of the box for hard drive SMART functionality. Scriptable for unattended or GUI end user install.
GNU General Public License v2.0
51 stars 15 forks source link

workaround to false alarm on external disk removing #15

Open zhladik opened 7 years ago

zhladik commented 7 years ago

Yet another problem , probably in vanilla smartmontools core: Windows version alerts every external disk remove as problem (FailedOpenDevice error). May be missing hook on unmount? (different way as in Linux?) Most of my users uses external disks and do not disting (by device name - it uses unix dev instead Win X:) if problems is on local HD (serious) or external HD (removing is in fact false alarm).

May be SMT core/windows team will fix this soon. but in other case it will be nice make on alert routine some kind of filter to filter out this false alarm... Zdenek Hladik

deajan commented 7 years ago

Good idea indeed, but since FailedOpenDevice error can also happen when an internal disk becomes unavailable, it would require for the error script to know what kind of disk it's dealing with.

Also, even by discarding external disk FailedOpenDevice error, there could be a problem when a disk really becomes unavailable even when it's plugged in in case of hardware failure.

Can you elaborate your use case ? When using DEVICESCAN, this can happen. When using manual disk list, it automatically excludes external disks since you give smartd a list. You may also set a /dev/sdb -d ignore before the DEVICESCAN directive to specifically ignore next disk.

Do you want an option to automatically disregard those errors for external drives anyway ?