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, detects silent data corruptions and provides 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 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 running 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

Last one!

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 are 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 years.

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

Tell us what you think!

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

%d bloggers like this: