Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    67

    Default Smartcheck for SATA drives

    I recently got new server with SATA hard drives and I found that cpanel smartcheck script is not working with SATA drives. However SMARTD itself is working with that drives and it just need to use additional parameter "-d ata"
    So after I edited cpanel smartcheck script /scripts/smartcheck it started to work properly with my drives.

    All you need to edit this part:
    PHP Code:
    my %smart = (
        
    'url'         => 'http://smartmontools.sourceforge.net/',
        
    'version_cmd' => '-V',
        
    'version_rgx' => 'smartctl version ',
        
    '2.1'         => {
            
    'smart_enabled_cmd' => '-d ata -i',
            
    'smart_enabled_rgx' => 'Drive supports S.M.A.R.T. and is enabled',
            
    'errors_only'       => '-d ata -l',
            
    'ok_drive_rgx'      => [qw(/sd /hd)],
        },
        
    '5.32'        => {
            
    'smart_enabled_cmd' => '-d ata -i',
            
    'smart_enabled_rgx' => 'SMART support is: Enabled',
            
    'errors_only'       => '-d ata -q errorsonly -H -l selftest -l error',
            
    'ok_drive_rgx'      => [qw(/sd /hd)],
        },
    ); 
    As you can see I just added there "-d ata" in the start of each parameter line and it worked properly for me.
    So I think CPanel should add this feature to their script and check whether hard drive is SATA or SCSI and add proper parameters for SMARTD command then.

  2. #2
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Finally my smartcheck works on my SATA drives!!!
    Thank you!!!

    Unfortunately I got this report:
    S.M.A.R.T Errors on /dev/sda
    From Command: /usr/sbin/smartctl -d ata -q errorsonly -H -l selftest -l error /dev/sda
    ATA Error Count: 2
    Error 2 occurred at disk power-on lifetime: 10266 hours
    Error 1 occurred at disk power-on lifetime: 9981 hours
    ----END /dev/sda--

    S.M.A.R.T Errors on /dev/sdb
    From Command: /usr/sbin/smartctl -d ata -q errorsonly -H -l selftest -l error /dev/sdb
    ATA Error Count: 4
    Error 4 occurred at disk power-on lifetime: 14375 hours
    Error 3 occurred at disk power-on lifetime: 14375 hours
    Error 2 occurred at disk power-on lifetime: 14163 hours
    Error 1 occurred at disk power-on lifetime: 14021 hours
    ----END /dev/sdb--
    Michael

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by rs-freddo
    S.M.A.R.T Errors on /dev/sda
    From Command: /usr/sbin/smartctl -d ata -q errorsonly -H -l selftest -l error /dev/sda
    ATA Error Count: 2
    Error 2 occurred at disk power-on lifetime: 10266 hours
    Error 1 occurred at disk power-on lifetime: 9981 hours
    ----END /dev/sda--
    There is no need to worry about this error. Raed my posting: http://forums.cpanel.net/showthread.php?t=53613#4
    Last edited by AndyReed; 08-03-2006 at 10:18 PM.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  4. #4
    Member
    Join Date
    Jun 2003
    Posts
    67

    Default

    Some disks also require special parameters for smartctl to enable firmware options otherwise they may report of false errors.
    I've had some server in the past with Samsung hard drives and was need to run smartctl with some option which I cannot recall now but it exist such parameter to enable applying of special firmware.

  5. #5
    Registered User
    Join Date
    Apr 2005
    Location
    Charlotte, NC
    Posts
    1

    Default

    Thanks! This makes smartcheck work for me also. Unfortunately, upcp sees that the md5 changed for smartcheck and promptly replaces it with the old one. Is there an easy way to make this change stick? I was going to just change the permissions on the script but don't want to break any real updates to it that may come in the future. Thoughts?

    Thanks -Dave

  6. #6
    Member
    Join Date
    Jun 2003
    Posts
    67

    Default

    Quote Originally Posted by dapinard
    Thanks! This makes smartcheck work for me also. Unfortunately, upcp sees that the md5 changed for smartcheck and promptly replaces it with the old one. Is there an easy way to make this change stick? I was going to just change the permissions on the script but don't want to break any real updates to it that may come in the future. Thoughts?

    Thanks -Dave
    Thats why I opened this thread - CPanel team should add this feature to their next version so it will be no need to worry about upcp replacement.

  7. #7
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Then you need to put this information into an enhancement bugzilla entry to bring it to their attention.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    67

  9. #9
    Member
    Join Date
    Nov 2003
    Posts
    129

    Default

    This is a more serious problem on some units I have a brand new machine having an issue with this it has twice crashed as a result of this running first the cpu goes out of control high then it emails me a msg that says

    The following warning/error was logged by the smartd daemon:

    Device: /dev/sda, not capable of SMART self-check

    and then the box crashes ~

    I added to your bugzilla !!

  10. #10
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You can disable the check for now by simply:

    touch /var/cpanel/disablesmartcheck
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  11. #11
    Member
    Join Date
    Sep 2006
    Location
    USA
    Posts
    86

    Default

    How can I update smartctl/smartd for cpanel? the 5.33 version couldn't enable SMART, howevere, after I installed 5.37 it enabled it and works with my SATA drive!!

  12. #12
    Member
    Join Date
    Nov 2003
    Posts
    129

    Default

    Quote Originally Posted by ANewDay View Post
    How can I update smartctl/smartd for cpanel? the 5.33 version couldn't enable SMART, howevere, after I installed 5.37 it enabled it and works with my SATA drive!!
    I wish I knew ~ that unit I mentioned is still running with it OFF and according to WD the drives ARE capable of smart ~ and Im running with it off and blind~

  13. #13
    Member
    Join Date
    Sep 2006
    Location
    USA
    Posts
    86

    Default

    Why don't Cpanel fix this already?

  14. #14
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default

    Hi!
    I didn't fix the scripts but I execute the command and found below:

    /usr/sbin/smartctl -d ata -q errorsonly -H -l selftest -l error /dev/sda
    Please note the following marginal Attributes:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    190 Unknown_Attribute 0x0022 063 039 045 Old_age Always In_the_past 37

    and it's found on both Hard drive of this box :
    /usr/sbin/smartctl -d ata -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 052 036 045 Old_age Always In_the_past 48

    Should we worry about this ?

    Also, on my other box, which equip with 2 ATA Hard Drives, shows same problem:

    /usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/hda
    Please note the following marginal Attributes:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    190 Unknown_Attribute 0x0022 058 040 045 Old_age Always In_the_past 43958272042

    /usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/hdc
    Please note the following marginal Attributes:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    190 Unknown_Attribute 0x0022 057 038 045 Old_age Always In_the_past 1036129271851

  15. #15
    Member
    Join Date
    May 2007
    Posts
    20

    Default

    SMART check doesn't work on my SCSI drives...

    Do they not support SMART?

Similar Threads & Tags
Similar threads

  1. smartcheck
    By rs-freddo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-28-2008, 07:19 PM
  2. SATA 500G very slow
    By pedsil in forum Database Discussions
    Replies: 1
    Last Post: 06-28-2008, 09:47 PM
  3. SATA Drives
    By CompufixHosting in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 02-01-2008, 11:04 PM
  4. Upgrade Server Disk IDE to Sata
    By Tymsah in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-09-2007, 04:12 PM
  5. whm doesn't report SATA drives
    By ANewDay in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-29-2006, 11:21 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube