sensu-plugins-disk-checks icon indicating copy to clipboard operation
sensu-plugins-disk-checks copied to clipboard

check-smart.rb doesn't recognize NVMe SSD

Open mdzidic opened this issue 5 years ago • 2 comments

check-smart.rb throws: CheckSMART UNKNOWN: No SMART capable devices found

And this is output from lsblk:

# lsblk -nro NAME,TYPE
nvme0n1 disk
nvme0n1p1 part
md0 raid1
nvme0n1p2 part
md1 raid1
nvme0n1p3 part
md2 raid1
nvme1n1 disk
nvme1n1p1 part
md0 raid1
nvme1n1p2 part
md1 raid1
nvme1n1p3 part
md2 raid1

mdzidic avatar Mar 04 '19 13:03 mdzidic

NVMe drives require having SMART capabilities, so smartctl will not output that the device has capability.

https://www.smartmontools.org/ticket/1134

pfak avatar Apr 25 '20 20:04 pfak

If I understand things correctly, NVMe drives have basic SMART capabilities. There just aren't optional ones that can be turned on/off.

Unlike ATA/SATA, NVMe drives have no optional SMART support which could be unavailable or disabled. The NVMe SMART/Health Information log is mandatory.

See https://www.smartmontools.org/ticket/1134#comment:10

SMART/Health Information (NVMe Log 0x02) seems to be something to scan for in the smartctl output, in the find_devices method:

https://github.com/sensu-plugins/sensu-plugins-disk-checks/blob/master/bin/check-smart-status.rb#L311

FredrikWendt avatar Apr 27 '24 18:04 FredrikWendt