Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automate running SMART test

Featured Replies

Does anyone automate running SMART checks on theie drives?? I just added the new Unmenu plugin: MyMain which shows all of the SMART statistics easily which made me think if I needed to automate running the SMART tests and then check them from time to time thru Unmenu.

 

What do you think??

See this post for a script that loops through them all.  There is another script to do automated parity checks each month, and these 2 scripts could probably be integrated.  See also the other Maintenance ideas in the linked thread.  Also see the Best of the Forums wiki page for more maintenance info, and Addon info.

  • Author

Thanks Rob but I a have a few questions.

 

See this post for a script that loops through them all.

 

I have this setup already and it works but this does not run the actual short/long tests, I believe. Do I need to run these tests to find potential problems with the drives?

Maybe I don't understand how SMART works. Does SMART constantly monitor or only when "tests" are run?

If it constantly monitors what do the tests add?

 

 

There is another script to do automated parity checks each month, and these 2 scripts could probably be integrated.

 

Yeah I already have this....and it's GREAT!!!!

 

 

Maybe I don't need to do what I am trying to do  ???

  • 4 weeks later...

That script I linked does not do testing, it grabs and saves dated SMART reports for every drive.  The SMART system of each drive, unless instructed to, is not actually testing the sectors of the drive, but monitoring all operations and maintaining tables of information.  It is recording anomalies and parameters that are out of nominal range, as well as failures, but the only way it records a bad sector is if it is encountered in response to a user request, one that returns an abnormal result.  See this article for a good discussion of SMART and smartctl.  As you know, the SMART system does have tests available to run, and will start them if requested, and they do examine the sectors for errors.  To view the results of those tests, you wait an appropriate amount of time, shorter or much longer depending on the test requested, and then request a SMART report which will have the updated attribute tables and summarized test results.

 

I think you have a good idea here.  I believe many users would be interested in a monthly script that first initiated a SMART short self-test on each drive, waited several minutes, requested dated SMART reports for each drive, then started a parity check.  Optionally, it could also update a drive log for each drive, that could be accessed by UnMENU plugins such as MyMain.

  • Author

I think you have a good idea here.  I believe many users would be interested in a monthly script that first initiated a SMART short self-test on each drive, waited several minutes, requested dated SMART reports for each drive, then started a parity check.  Optionally, it could also update a drive log for each drive, that could be accessed by UnMENU plugins such as MyMain.

 

Thanks for replying to this with so much detail.

 

Please correct me if I am wrong but doesn't a parity check check each sector on the drive and if it found an error wouldn't it record that with the SMART data??

 

This does sound like a good addition to the monthy parity check script that alot of us run.

  • Author

I think you have a good idea here.  I believe many users would be interested in a monthly script that first initiated a SMART short self-test on each drive, waited several minutes, requested dated SMART reports for each drive, then started a parity check.  Optionally, it could also update a drive log for each drive, that could be accessed by UnMENU plugins such as MyMain.

 

One other thought is that it would be nice, not sure if it possible, if after the tests are run to have the script "analyze" the results and send an email alert if certain thresholds are crossed indicating a problem on the drive. Some people would not want to have to check the report each month but rather notified of errors only and then the ability to check the reports thru MyMain.

 

I for one am a little lost reading the SMART reports but know some of the key sections to look at.

 

I will see if I can come up with something but I am very new at writing scripts but may be able to help some. If anyone else is willing to help it would be appreciated  ;D

The tools for almost all of this are already available.  Joe has done some diff'ing of SMART reports, and could probably add a little evaluation, or check for changes in selected values, to see if there is something requiring notification.  There are already some email notification scripts that could be called or adapted.  And MyMain already gives a nice overview of most or all of the important SMART numbers and messages for all drives, on one screen.

 

But I imagine I'm not the only one that's somewhat swamped with things to do...

  • 4 weeks later...

It would be easy to add those scripts as a cronjob from the getgo, and automatically email the results. Sorta like a reminder each month.

I really like unraid so far. I bought two lic. I am find alot of failed drives and bad cables as a result (which is great) because now things will be more stable.

  • Author

Yeah I am not too savvy to be able to come up with the right scripts...if anyone can help out that would be appreciated.

 

Thanks,

Scott

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.