Key SMART history and metrics by drive serial/WWN, not device path #41
Notifications
Due Date
No due date set.
Blocks
Reference: LotusGuild/hwmonDaemon#41
Reference in new issue
Block a user
Problem
SMART trend history is stored per device path (
/var/log/hwmonDaemon/smart_history__dev_sdX.json, see_analyze_smart_trends). Linux device names are not stable: they reshuffle at boot and change on hot-plug, so one file collects several physical drives and trend checks compare unrelated disks.Evidence (compute-storage-01, checked 2026-11-24)
smart_history__dev_sdf.json(717 entries) holds three different drives:sdfbefore a rebootOn the same day osd.7's 16TB disk (S/N ZL2L59XD) dropped off the HBA and re-enumerated as
sdk:smart_history__dev_sda.jsonstopped on 11-15, andsdkstarted a fresh file with no history.smartd had the same path-keyed problem: it sent a false daily "Failed SMART usage Attribute: 5 Reallocated_Sector_Ct" alert for the removed RE4, because it was comparing the new Seagate's values against the WD's cached thresholds.
Proposal
smartctl -j→wwn), falling back tomodel + serialwhen there's no WWN. Resolve the device path to an identity on every run.smart_history_<key>.json. Storemodel,serial,wwn, and the last-seenhost/deviceinside each entry.Power_On_Hoursgoing backwards, or a change in the attribute set, as the split signal, since old entries have no serial. Archive anything that can't be split cleanly; don't merge it.serial,wwnandmodellabels tohwmon_drive_*, and keepdeviceas an informational label.hwmon_*series, sografana-dashboard.jsonhas no data. CheckPROMETHEUS_ENABLED/ the textfile path on the nodes.Acceptance
/dev/sdX, or rebooting, keeps a single unbroken history for that drive.sdffile and gets three separate per-drive histories.Related
serialNumber) for drives, so serial is the shared lookup key that issue asks for.Power-Off_Retract_Countrose 3 → 11 in a week whilePower_Cycle_Countstayed at 3. This is probably the power dips on that SATA power lead.