Get a Quote   (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

S.M.A.R.T. Tests

  6 minute read.

Last Modified 2022-06-21 09:36 EDT

S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) is a standard for disk monitoring and testing. You can monitor disks for problems using different kinds of self-tests. TrueNAS can adjust when it issues S.M.A.R.T. alerts. When S.M.A.R.T. monitoring reports a disk issue, we recommend you replace that disk. Most modern ATA, IDE, and SCSI-3 hard drives support S.M.A.R.T. Refer to your respective drive documentation for confirmation.

SMARTTestsSCALE

TrueNAS runs S.M.A.R.T. tests on disks. Running tests can reduce drive performance, so we recommend scheduling tests when the system is in a low-usage state. Avoid scheduling disk-intensive tests at the same time! For example, don’t schedule S.M.A.R.T. tests on the same day as a disk scrub or other Data Protection task.

Go to Storage, then click the Disks drop-down and select Disks.

Click the in a disk’s row to expand it. Enable S.M.A.R.T. shows as true or false.

To enable or disable testing, click EDIT and find the Enable S.M.A.R.T. option.

Manual S.M.A.R.T. Test

To quickly test one or more disk for errors, select the disks you want to test and click MANUAL TEST.

SMARTTestsQuickSCALE

Next, select the test Type. Test types differ based on the drive connection, ATA or SCSI:

Manual S.M.A.R.T. tests on NVMe devices is currently not supported.
  • Long runs a S.M.A.R.T. Extended Self Test that scans the entire disk surface, which may take hours on large-volume disks.
  • Short runs a basic S.M.A.R.T. Short Self Test (usually under ten minutes) that varies by manufacturer.
  • Conveyance runs a S.M.A.R.T. Conveyance Self Test (usually only minutes) that identifies damage incurred while transporting the device.
  • Offline runs a S.M.A.R.T. Immediate Offline Test that updates the S.M.A.R.T. Attribute values. Errors will appear in the S.M.A.R.T. error log.
  • Long runs the “Background long” self-test.
  • Short runs the “Background short” self-test.
  • Offline runs the default self-test in the foreground, but doesn’t place an entry in the self-test log.

For more information, refer to smartctl(8).

Click START to begin the test. Test duration varies based on the test type you chose. TrueNAS generates alerts when tests discover issues.

Click the in a disk’s row to expand it, then click S.M.A.R.T. TEST RESULTS. You can also see results in the Shell using smartctl and the name of the drive: smartctl -l selftest /dev/ada0.

Automatic S.M.A.R.T. Tests

To schedule recurring S.M.A.R.T. tests, go to Data Protection and click ADD in the S.M.A.R.T. Tests window.

SMARTTestsAddSCALE

NameDescription
All DisksSetting All Disks includes every disk with S.M.A.R.T. enabled. Leave unset to choose which Disks to test.
DisksSelect the disks to monitor.
TypeChoose the test type. See smartctl(8) for descriptions of each type. Some types degrade performance or take disks offline.
DescriptionEnter information about the S.M.A.R.T. test.
ScheduleThe time the test runs. Choose a preset or select Custom to open the advanced scheduler.

Choose the Disks to test, the test Type to run, and the task’s Schedule.

S.M.A.R.T. tests can offline disks! Avoid scheduling S.M.A.R.T. tests simultaneously with scrub or other data protection tasks.

If you need the test to run on a specific Schedule, choose Custom to open the advanced scheduler.

AdvancedSchedulerSCALE

Choosing a Presets option populatess in the rest of the fields. To customize a schedule, enter crontab values for the Minutes/Hours/Days.

These fields accept standard cron values. The simplest option is to enter a single number in the field. The task runs when the time value matches that number. For example, entering 10 means that the job runs when the time is ten minutes past the hour.

An asterisk (*) means match all values.

You can set specific time ranges by entering hyphenated number values. For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.

You can also enter lists of values. Enter individual values separated by a comma (,). For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).

A slash (/) designates a step value. For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.

Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.

TrueNAS has an option to select which Months the task runs. Leaving each month unset is the same as selecting every month.

The Days of Week schedules the task to run on specific days in addition to any listed days. For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.

The Schedule Preview dipslays when the current settings mean the task runs.

Examples of CRON syntax

SyntaxMeaningExamples
*Every item.* (minutes) = every minute of the hour.
* (days) = every day.
*/NEvery Nth item.*/15 (minutes) = every 15th minute of the hour.
*/3 (days) = every 3rd day.
*/3 (months) = every 3rd month.
Comma and hyphen/dashEach stated item (comma)
Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour.
1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour.
mon-fri (days) = every Monday to Friday inclusive (every weekday).
mar,jun,sep,dec (months) = every March, June, September, December.

You can specify days of the month or days of the week.

TrueNAS lets users create flexible schedules using the available options. The table below has some examples:

Desired scheduleValues to enter
3 times a day (at midnight, 08:00 and 16:00)months=*; days=*; hours=0/8 or 0,8,16; minutes=0
(Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pmmonths=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 ammonths=oct-dec,jan-jun; days=1,15; hours=0; minutes=1
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to FridayNote that this requires two tasks to achieve:
(1) months=*; days=mon-fri; hours=8-18; minutes=*/15
(2) months=*; days=mon-fri; hours=19; minutes=0
We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.

Saved schedules appear in the S.M.A.R.T. Tests window.

To verify the schedule is saved, you can open the shell and enter smartd -q showtests.

Service Options

You must enable the S.M.A.R.T. service to run automatic S.M.A.R.T. tests.

Disable the S.M.A.R.T. service when a RAID controller controlls the disks. The controller monitors S.M.A.R.T. separately and marks disks as a Predictive Failure on a test failure.

To start the S.M.A.R.T. service, go to System Settings > Services and toggle S.M.A.R.T.. To start the service during the TrueNAS boot process, set Start Automatically.

Configure the S.M.A.R.T. service by clicking .

SMARTTestsOptionsSCALE

NameDescription
Check IntervalMinutes for smartd to wake up and check if any tests should run.
Power ModeS.M.A.R.T. only tests when the Power Mode is Never.
DifferenceDegrees in Celsius. S.M.A.R.T. reports if a drive’s temperature has changed by N degrees Celsius since the last report.
InformationalThreshold temperature in Celsius. S.M.A.R.T. will message with a LOG_INFO log level if the temperature is above the threshold.
CriticalThreshold temperature in Celsius. S.M.A.R.T. will message with a LOG_CRIT log level and send an email if the temperature is above the threshold.

Click Save after changing any settings.