I've just set up CentOS 7 on a server with NVMe drives, and was suprised not to be able to run smartctl on them:# smartctl -a /dev/nvme0/dev/nvme0: Unable to detect device typePlease specify device type with the -d option.# smartctl -a /dev/nvme0 -d nvme/dev/nvme0: Unknown device type 'nvme'Then I noticed that CentOS ships with Smartmontools version 6.2, whereas Smartmontools supports NVMe starting from version 6.5.How can I upgrade Smartmontools to version 6.5 on CentOS 7?Their download page only offers Smartmontools 6.2 for CentOS 7.Ideally, I don't want to compile from source, I would prefer a RPM, or better, a third-party repo that would include the latest Smartmontools, to get regular updates.AlternativeI'm also open to suggestions if you know another tool, preferably included in CentOS 7, that could allow me to get SMART info from an NVMe drive.
Smartmontools with NVMe support on CentOS 7
centos;smartctl;smart;nvme
OK, I found 2 alternatives.Getting a precompiled binary that works on CentOS 7Even though their packages page only offers Smartmontools 6.2 for CentOS 7, their SVN builds page offers binaries that do work on CentOS.The proper archive has a .linux suffix, for example I chose:smartmontools-6.6-0-20170503-r4430.linux-x86_64.tar.gzThis archive contains a smartctl binary that works like a charm.Using the nvme command-line toolCentOS 7 ships with an nvme command (the yum package is named nvme-cli).It can list the NVMe drives:# nvme listAnd can read SMART info:# nvme smart-log /dev/nvme0And additional SMART info (not sure why it's split):# nvme smart-log-add /dev/nvme0