There is a home page for smartmontools.
Install the tools:
apt install smartmontools
Scan for drives:
# smartctl --scan
/dev/sda -d sat # /dev/sda [SAT], ATA device
/dev/sdb -d sat # /dev/sdb [SAT], ATA device
/dev/sdf -d scsi # /dev/sdf, SCSI device
# smartctl --scan -d nvme
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
Check the drives for SMART support. nvme drives don't have SMART support, but are available to the tools:
# smartctl -i /dev/nvme0n1
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 960 PRO 512GB
Serial Number: S3EWNWAJ200309M
Firmware Version: 1B6QCXP7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 512,110,190,592 [512 GB]
Unallocated NVM Capacity: 0
Controller ID: 2
Number of Namespaces: 1
Namespace 1 Size/Capacity: 512,110,190,592 [512 GB]
Namespace 1 Utilization: 31,038,529,536 [31.0 GB]
Namespace 1 Formatted LBA Size: 512
Local Time is: Sun Sep 24 18:29:43 2017 ADT
But many regular drives do:
# smartctl -i /dev/sdf
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Samsung based SSDs
Device Model: Samsung SSD 850 EVO 1TB
Serial Number: S35UNX0J102403N
LU WWN Device Id: 5 002538 d419eca15
Firmware Version: EMT02B6Q
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Sep 24 18:33:20 2017 ADT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Configurations can be changed in /etc/smartd.conf. Change the -m parameter to customize an email address.
/dev/nvme0n1 -a -H -S on -d nvme -m xxx
/dev/sda -a -H -S on -d sat -m xxx
/dev/sdb -a -H -S on -d sat -m xxx
/dev/sdf -a -H -S on -d sat -m xxx
Enable the service by uncommenting "start_smartd=yes" in /etc/default/smartmontools.
Then start the service: systemctl start smartmontools
Running a manual self test:
# smartctl -t short /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1 minutes for test to complete.
Test will complete after Sun Sep 24 19:24:05 2017
Use smartctl -X to abort test.
# smartctl -l selftest /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Self-test routine in progress 20% 29 -
# smartctl -l selftest /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 29 -
# smartctl -l error /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.12.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
No Errors Logged
Continue reading "Running SmartMonTools to Regularily Check..." »