Recently, one of our customers 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 don’t support NVMe on Centos 6.X. Also, you can read about how to install smartmontools in the below post:
There is 2 solutions how you can monitor in that way.
- nvme-cli – this program is a user-space utility to provide standards-compliant tooling for NVM-Express drives.
- Upgrade smartmontools to the latest version.
Let’s check both this method:
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
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.