new device detection engine (OS aware). Uses smartctl --scan to detect drives (and conditionally uses jaypipes/ghw). WWN is calculated from smartctl data, then retrieved from GHW, and fallsback to serial number. WWN calcuation code is based on IEEE spec, for "Registered" IEEE format - NAA5. TODO: support NAA6 and other formats?

This commit is contained in:
Jason Kulatunga
2020-09-18 19:27:55 -06:00
parent f53833d617
commit 23d5b86b1b
13 changed files with 436 additions and 116 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ type SmartInfo struct {
ModelName string `json:"model_name"`
SerialNumber string `json:"serial_number"`
Wwn struct {
Naa int `json:"naa"`
Oui int `json:"oui"`
ID int64 `json:"id"`
Naa uint64 `json:"naa"`
Oui uint64 `json:"oui"`
ID uint64 `json:"id"`
} `json:"wwn"`
FirmwareVersion string `json:"firmware_version"`
UserCapacity struct {