The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

upcp, smartcheck, and 3ware RAID

Discussion in 'General Discussion' started by alphawolf50, Dec 20, 2011.

  1. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi,

    I've noticed that upcp tries to check the SMART status of my hard drives, but always fails stating "S.M.A.R.T does not appear to be enabled for this device". I know this happens because the drives are behind a 3ware RAID controller, as these two commands work as expected:

    smartctl -a /dev/twa0 -d 3ware,0
    smartctl -a /dev/twa0 -d 3ware,1

    Is there a way to update upcp/smartcheck to use the devices/flags I've specified above rather than /dev/sda? Ideally the change would be not be overwritten by future cPanel updates.

    I noticed in the smartcheck script there was a line that read
    Code:
    my $cust_d_file = '/var/cpanel/smartcheck_custom_dash_d.yaml';
    So I assume I need to create a /var/cpanel/smartcheck_custom_dash_d.yaml. Unfortunately, I have no idea what the format/syntax of this file should be...
     
  2. Brian

    Brian Well-Known Member

    Joined:
    Dec 1, 2010
    Messages:
    117
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Running /scripts/smartcheck --help confirms the format is a simple YAML file with a key/value hash of the drive and its "-d" flag value.

    Snippet from --help output:
    So, you could create the .yaml file with the contents:

    But, note that since /scripts/smartcheck is only aware of ONE logical device (the 3ware controller /dev/twa0) there's no way for it to understand that you'd like it to actually loop twice on /dev/twa0 to perform two checks (one per drive). Smartcheck is only capable of understanding 1 check per 1 logical device.

    For such 3ware raid controller smart checking, I'd honestly recommend something more complex like smartmontools. It will permit you to setup a service daemon that routinely checks drives at configured intervals. This is much more robust than the simple smartcheck within upcp and would be advised to supplement cPanel's existing checks/etc to better check your 3ware controller.
     
  3. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thanks, Brian, that's exactly what I needed to know. Don't know why I didn't think to try "--help"... doh!
     
Loading...

Share This Page