(866) 366-3640 - support@sagonet.com
Sago Logo
Banner

   
Log in / create account Page Discussion History Go to the site toolbox
Cpanel SMART Errors

Cpanel SMART Errors

Cpanel is not terribly intelligent about interpreting SMART errors or how it runs the SMART monitoring or analysis scripts. As a result is is pretty common to receive Cpanel SMART alerts which are bogus.

HOWEVER - that does not mean that all such Cpanel SMART messages are false, and it certainly doe not mean SMART errors in general should be ignored, far from it.

This article is aimed and clarifying erroneous Cpanel SMART warnings. For far more information on SMART in general see the full article on smart

Here is an all too typical example of a false Cpanel SMART warning:

S.M.A.R.T Errors on /dev/sdb
                From Command: /usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sdb
                Please note the following marginal Attributes:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
190 Unknown_Attribute 0x0022 065 040 045 Old_age Always In_the_past 35
                ----END /dev/sdb--

Now, here is why this is false and how you can tell:

1) The message reports the script being run is "/usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sdb"

If you have SATA drives, this will just not work. The smartctl script requires the additional -d ATA argument, so this script is likely going to fail.

2) Look closely at the attribute being reported: 190 Unknown_Attribute This is not a critical drive attribute. Though it may have recorded an error, it does not mean there is a critical drive issue.

3) Now, this is very important, even if the script does run correctly, and even if it reports true errors, it does not differentiate between and error that happened today or one from 3 years ago. This script just shows ALL errors EVER recorded. Not particularly useful.

You can run the above script in the shell, modify the arguments as needed, and see what it really reports and play around with this and see.

Here is an example of the script running correctly and the output produced:

Callandor:~ # /usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sdb
Warning: ATA error count 1338 inconsistent with error log pointer 5

ATA Error Count: 1338 (device log contains only the most recent five errors)
Error 1338 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
Error 1337 occurred at disk power-on lifetime: 8076 hours (336 days + 12 hours)
Error 1336 occurred at disk power-on lifetime: 8053 hours (335 days + 13 hours)
Error 1335 occurred at disk power-on lifetime: 7562 hours (315 days + 2 hours)
Error 1334 occurred at disk power-on lifetime: 7360 hours (306 days + 16 hours)

In this case the error reported is not a numbered SMART attribute from the list of monitored attributes, but rather the ATA error count. That is because on this drive there are no errors reported in those attributes, thus only the ATA Error Count is shown.

Note it also gives the hours of when these occurred. So how long ago was that? Does it matter? Good question! To determine this examine the Power_on_hours attribute. Or you can run the short test and then examine the results. (see scripts below and the full article on smart)

You might also get output showing the total number of reallocated sectors or pending sectors. These are definitely worth investigating further.

Note all these examples are significantly different from the first Cpanel output example. Take a look at that one again - it should be clear now that it in fact means nothing really.

Actually Useful SMART Commands

Okay - so the Cpanel script is not very helpful, but you can certainly use these commands for predict and analyze real drive issues:

smartctl -a /dev/hda smartctl -a -d ata /dev/sda <---- For SATA Drives

smartctl -t short /dev/sdb This runs a short test on the drive, you then view the results with the above commands.

Note: you can even just schedule these to run as a cron job and pipe the output to | mail you@youremail.com to automate this.

There are also various scripts you can customize for smartd and smartctl, these scripts are usually in:

There are example scripts included with smartmontools. These are usually located in a location like:

/usr/share/doc/smartmontools-5.33/examplescripts

/usr/local/etc/smartd.conf Settings for smartd which controls monitoring

See the README for more information. There are many other scripts you can find on line people have developed to run as cron jobs, etc. and watch attributes, sending notification when criteria are met, etc.


Make it stop!

To disable these Cpanel messages:

  1. touch /var/cpanel/disablesmartcheck

However, be aware that you absolutely should manually check the SMART status of your drive and interpret the results on a regular basis.

SMART is quite useful and just might save the day for you, but it must be properly used to be effective.