How to monitor NVME drives on Centos 6

Recently, one of our customer asked us to upgrade his server hardware. Unfortunately, they can’t update their software and We had to install Centos 6 with new NVMe drives. But, We need to monitor them and default smartmontools doesn’t support NVMe on Centos 6.X. Also, you can read about how to install smartmontools by the link: https://linuxnotes.org/monitor-hdd-and-ssd-with-smartd-and-smartctl/

There is 2 solutions how you can monitor in that way.

  1. nvme-cli – this program is a user-space utility to provide standards-compliant tooling for NVM-Express drives.
  2. Upgrade smartmontools to the latest version.

Let’s check both this method:

nvme-cli installation

This tools doesn’t exist on standard Centos 6 repository. So, We had to build it from source using commands:

cd /tmp
wget https://github.com/linux-nvme/nvme-cli/archive/v1.11.1.tar.gz
tar zxf v1.11.1.tar.gz
cd nvme-cli-1.11.1
make 
make -s install

Now you can check NVMe drive status with following command:

 nvme smart-log /dev/nvme0

Upgrade smartmontools

Centos 6 repository doesn’t have smartmontools version which has nvme support. So, We have to build too:

wget https://github.com/smartmontools/smartmontools/releases/download/RELEASE_6_6/smartmontools-6.6.tar.gz
tar -zxf smartmontools-6.6.tar.gz
cd smartmontools-6.6
./configure --without-cxx11-option --with-nvme-devicescan=yes
make
make -s install

After that you can monitor your NVMe with smartctl.

You can read more Linux manuals by link https://linuxnotes.org/category/linux-how-to/

Viva La Linux!

Leave A Comment