Recommended SMART tests and scrub settings?

Status
Not open for further replies.

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Hi,

I have a HP N40L with three SATA drives (two Toshiba 3TB Deskstars, and one WD/Hitachi 4TB Deskstar), in a RaidZ-1 configuration.

I'd like to schedule periodic SMART test and scrubs and

For example, for the SMART tests, I have
  • Long Self-Test
  • Short Self-Test
  • Conveyance Self-Test (ATA Only)
  • Offline Immediate Test (ATA Only)
Then of course, I have the test frequency.

The documentation (http://doc.freenas.org/9.3/freenas_tasks.html#s-m-a-r-t-tests) mention using the short self-test once a week and the long self-test once a month.

I'm curious what people are using in their wild, or their thoughts on how often to run these and which types to use more?

I have the default 35-day scrub setup as well - is that fairly reasonable?

Also, if the scrub fails, does an email alert get sent? (I couldn't see anything in the UI, and the docs don't mention it at http://doc.freenas.org/9.3/freenas_storage.html#scrubs).

Cheers,
Victor
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Personally I use this schedule:
Code:
+=================+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+
|task        day->|01   |02   |03   |04   |05   |06   |07   |08   |09   |10   |11   |12   |13   |14   |15   |16   |17   |18   |19   |20   |21   |22   |23   |24   |25   |26   |27   |28   |29   |30   |31   |
+=================+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+
|pool scrub       |04:00|     |     |     |     |     |     |     |     |     |     |     |     |     |     |04:00|     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|long smart test  |     |03:00|     |     |     |     |     |     |     |     |     |     |     |     |     |     |03:00|     |     |     |     |     |     |     |     |     |     |     |     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|short smart test |     |     |     |     |     |     |05:00|     |     |     |     |05:00|     |     |     |     |     |     |     |     |     |05:00|     |     |     |     |05:00|     |     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|send smart report|     |     |06:00|     |     |     |     |06:00|     |     |     |     |06:00|     |     |     |     |06:00|     |     |     |     |06:00|     |     |     |     |06:00|     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|send zpool report|     |     |06:01|     |     |     |     |     |     |     |     |     |     |     |     |     |     |06:01|     |     |     |     |     |     |     |     |     |     |     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|send ups report  |     |     |06:02|     |     |     |     |     |     |     |     |     |     |     |     |     |     |06:02|     |     |     |     |     |     |     |     |     |     |     |     |     |
+-----------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+


And I execute some custom scripts (see my signature) to send an email even if all is OK. I prefer to see the values by myself after each test rather than trust the system to send an email if something is wrong.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Also, if the scrub fails, does an email alert get sent? (I couldn't see anything in the UI, and the docs don't mention it)
If you set up your email during the initial (wizard) set up, then you should receive an email each time
a scrub (trouble or not) takes place.
I personally do short tests weekly, long tests twice each month and a scrub once every 28 days.

Here's an example of the email I get when a scrub starts;
from: xxxxxxxxxxxxxxxxxxx@gmail.com
to: xxxxxxxxxxxxxxxxxxx@gmail.com
date: Wed, Feb 18, 2015 at 4:00 AM
subject: Cron <root@freenas> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/local/sbin/scrub -t 14 plumber
starting scrub of pool 'plumber'
mailed-by: gmail.com
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Keep in mind when setting a threshold that it measures from when the last scrub finished. Thus, if you want your scrub to run every two weeks (like I do), schedule it for, say, Wednesday at 1800, and set the threshold to 14 days, it will actually run every three weeks. On the first Wednesday, it will run, and take some non-zero amount of time to complete. On the next Wednesday at 1800, it will be 6 days and change (i.e., less than 14 days) from the end of the last scrub, so it won't run. The following Wednesday at 1800, it will be 13 days and change (still less than 14 days), so it still won't run. The third Wednesday at 1800, it will be 20 days and change (more than 14 days), so the scrub will run.

tl;dr: set your threshold to a day or two less than the interval you want. I run scrubs every two weeks; my threshold is set to 12 days.
 
Status
Not open for further replies.
Top