From 3dbab24c0f1ce57756811339e61daaebb2a72de5 Mon Sep 17 00:00:00 2001 From: henrygd Date: Tue, 28 Oct 2025 22:37:47 -0400 Subject: [PATCH] improve identification of smart drive types (#1345) --- agent/smart.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/agent/smart.go b/agent/smart.go index 89418497..6601d5eb 100644 --- a/agent/smart.go +++ b/agent/smart.go @@ -335,8 +335,12 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error { func (sm *SmartManager) smartctlArgs(deviceInfo *DeviceInfo, includeStandby bool) []string { args := make([]string, 0, 7) - if deviceInfo != nil && deviceInfo.Type != "" { - args = append(args, "-d", deviceInfo.Type) + if deviceInfo != nil { + deviceType := strings.ToLower(deviceInfo.Type) + // types sometimes misidentified in scan; see github.com/henrygd/beszel/issues/1345 + if deviceType != "" && deviceType != "scsi" && deviceType != "ata" { + args = append(args, "-d", deviceInfo.Type) + } } args = append(args, "-aj")