FreeNAS Essentials: How to set up SMART Tests and Scrubs

Welcome back, everyone! While we are at it, let’s keep the FreeNAS tutorials coming. Today you will learn another Essential: How to set up SMART Tests and Scrubs.

It is important that you run both of them on a regular basis to ensure disk health and keep your filesystem clean. I will quickly explain the difference between the two and show you how to set them up on a schedule that makes sense. We are going to use the excellent instructions of Cyberjock, a moderator of the FreeNAS Forums as a guideline. If you are new to FreeNAS and want to learn how to install it, check out this article.

What are Scrubs

Scrubs on a ZFS Volume helps you to identify data integrity problems, detect silent data corruptions, and provide you with early alerts to disk failures. It also cleans up your disks. Scrubs only checks used disk space; that’s why we also use SMART tests to check the whole disk’s health. It’s the regular maintenance for ZFS Volumes / Pools. Scrubs can take a very long time if you have a large volume. That’s why we schedule them at night time.

What are S.M.A.R.T tests

SMART tests are internal drive tests. There are 2 kinds of S.M.A.R.T tests, Long and Short. Short tests can only take 5 minutes, where Long tests can run several hours. SMART tests are non-destructive, but they run on a per-disk interval, so it only runs on one disk at a time.  S.M.A.R.T tests are essential for keeping track of your disk health. You also don’t want to schedule short and long tests at the same time.

The Schedule

We are using the following schedule for our tests.

  • SCRUBS: Every 1st and 15th of the month at 4 am. The threshold on 10 days.
  • Short S.M.A.R.T tests: Every 5th, 12th, 19th, and 26th of the month at 3 am.
  • Long S.M.A.R.T tests: Every 8th and 22nd at 4 am.

So let’s go ahead and start setting up our Scrubs first.

Step 1 – Setting up Scrubs

Navigate to Storage -> Scrubs -> Your Volume -> Select your Volume -> Edit

Enter everything as in the screenshot below.

How to set up Scrubs on FreeNAS
Setting up Scrubs
Scrubs FREENAS
How to set up Scrubs on FreeNAS

When you’re done, click on View Scrubs, and you should see something like this:

How to set up Scrubs on FreeNAS

That’s it. We are already done with setting up Scrubs.

Step 2 – Setting up the short S.M.A.R.T test

Navigate to Tasks -> S.M.A.R.T Test -> Add S.M.A.R.T Test.

Select all Disks you want to include in the test. (If you have FreeNAS installed on an SSD like me, exclude the SSD from the test, as it makes no sense to run it there). Adjust everything as in the screenshot below.

How to set up SMART tests on FreeNAS
Setting up a short SMART test
How to set up SMART tests on FreeNAS

And the short SMART test is completely set up.

Step 3 – Setting up the long S.M.A.R.T test

Click on Add S.M.A.R.T Test once again and adjust everything as in the screenshots below.

How to set up SMART tests on FreeNAS
Setting up the long SMART test
How to set up SMART tests on FreeNAS

And that’s it. Click on View S.M.A.R.T Tests, and you should see something along those lines.

How to set up SMART tests on FreeNAS
Checking our tests

Conclusion

Running S.M.A.R.T tests and Scrubs is essential for keeping your disks healthy and clean. I would recommend following the schedule above; it has proven to work very well for me over the last couple of years.

ℹ️ Related Articles
👉 My Popular DIY FreeNAS Build
👉 Use FreeNAS as an UniFi Controller
👉 FreeNAS Smart Tests & Scrubs
👉 How to install Plex Media Server on FreeNAS
👉 How to install FreeNAS
👉 How to create Windows Shares on FreeNAS
👉 Manually Update Plex Media Server on FreeNAS
👉 Upgrade FreeNAS to TrueNAS

6 thoughts on “FreeNAS Essentials: How to set up SMART Tests and Scrubs”

    • Because the short test usually takes only a little time whereas the long test, as the name implies, takes a long time 🙂 It’s so that the long test runs last so it doesn’t get interrupted by any other test.

      Reply
  1. Can you please comment on why you chose the 10-day threshold? It seems it could have been set to 13 days (as the 14th day is when you want the next test to run). Thanks.

    Reply
  2. I keep receiving this message from my freenas server>

    CRITICAL: June 16, 2018, 9:05 p.m. – Device: /dev/ada2, 6 Currently unreadable (pending) sectors

    Does it mean one of my HDD in the pool will die?

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap