PhilipMay / smart-prom-next

S.M.A.R.T. Prometheus Metrics Exporter
MIT License
17 stars 1 forks source link

[BUG] `--scan-open` might not find all revelant disks #28

Closed PhilipMay closed 2 years ago

PhilipMay commented 2 years ago

see here

root@wobdevl011:~# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0 10.9T  0 disk 
└─sda1        8:1    0 10.9T  0 part /srv/data
nvme0n1     259:0    0  477G  0 disk 
├─nvme0n1p1 259:1    0  476G  0 part /
├─nvme0n1p2 259:2    0    1K  0 part 
└─nvme0n1p5 259:3    0  975M  0 part [SWAP]
root@wobdevl011:~# smartctl --scan-open
/dev/sda -d sat # /dev/sda [SAT], ATA device
PhilipMay commented 2 years ago

but also see here (same machine):

root@wobdevl011:~# smartctl --scan-open -d nvme
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
PhilipMay commented 2 years ago

interesting doc here: https://www.smartmontools.org/browser/trunk/smartmontools/smartd.8.in

Examine all entries "/dev/hd[a-t]" for IDE/ATA devices, and "/dev/sd[a-z]", "/dev/sd[a-z][a-z]" for ATA/SATA or SCSI/SAS devices. Disks behind RAID controllers are not included.

If directive '-d nvme' or no '-d' directive is specified, examine all entries "/dev/nvme[0-99]" for NVMe devices.

PhilipMay commented 2 years ago

Could also be because of old smartctl version!

root@wobdevl011:~# smartctl 
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-176-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
PhilipMay commented 2 years ago

Never saw this happen with the image - closing.