• Areca and maybe other RAID Controller processing error for Smartctl reports


    SimonF
    • Minor

    I have an Areca Controller for testing and for smartctl to complete I need to specify -d areca,16/2 unraid is trying to use areca,16,2 which fails.

     

    root@computenode:~# smartctl -ad areca,16/2 /dev/sg7 | grep Temp
    190 Airflow_Temperature_Cel 0x0022   059   036   045    Old_age   Always   In_the_past 41 (Min/Max 41/42 #4)
    194 Temperature_Celsius     0x0022   041   064   000    Old_age   Always       -       41 (128 0 0 0 0)

     

    Below are formats for the options.

     

    image.thumb.png.58a9f4e671d2063fc7f355b2a2620464.png

     

     




    User Feedback

    Recommended Comments

    testing changes made to smartctl_type

     

    #!/usr/bin/php
    <?php
    // usage: smartctl_type name options
    // name is the device identifer, eg, "disk1"
    // options is a string to pass as options to 'smartctl' command
    function get_ctlr_options(&$type, &$disk) {
      if (!$type) return;
      $ports = [];
      if (strlen($disk['smPort1'])) $ports[] = $disk['smPort1'];
      if (strlen($disk['smPort2'])) $ports[] = $disk['smPort2'];
      if (strlen($disk['smPort3'])) $ports[] = $disk['smPort3'];
      $type .= ($ports ?  ','.implode($disk['smGlue'] ?? '/',$ports) : '');
    }
    // determine $device, eg, "sdb"
    $var   = (array)parse_ini_file('state/var.ini');
    $devs  = (array)parse_ini_file("/var/local/emhttp/devs.ini",true);
    $disks = (array)parse_ini_file("/var/local/emhttp/disks.ini",true);
    require_once "/usr/local/emhttp/webGui/include/CustomMerge.php";
    $name = $argv[1];
    $options = $argv[2];
    if (array_key_exists($name, $disks))
      $disk = $disks[$name];
    else if (array_key_exists($name, $devs))
      $disk = $devs[$name];
    else
      exit(1);
    
    // form $type, the complete '-d' option string to pass to smrtctl
    $device = $disk['device'];
    $type = $disk['smType'];
    get_ctlr_options($type, $disk);
    if ($type && $disk["smDevice"]) $device=$disk["smDevice"] ;
    
    var_dump($disk, $type, $options) ;
    // execute the 'smartctl' command
    passthru("/usr/sbin/smartctl $options $type /dev/$device", $retval);
    exit($retval);
    ?>

     

    Edited by SimonF
    Link to comment
    Quote

    I have an Areca Controller for testing and for smartctl to complete I need to specify -d areca,16/2 unraid is trying to use areca,16,2 which fails.

     

    The code allows different formats, I need to check what to correct in the smart command

    (of course doesn't stop you to use your own script)

     

    Link to comment
    17 hours ago, bonienl said:

     

    The code allows different formats, I need to check what to correct in the smart command

    (of course doesn't stop you to use your own script)

     

    Also not getting drive temps.

     

    string(13) "-d areca,16/2"
    string(2) "-a"
    smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.15.38-Unraid] (local build)
    Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Family:     Seagate Barracuda 7200.14 (AF)
    Device Model:     ST3000DM001-9YN166
    Serial Number:    
    LU WWN Device Id: 5 000c50 04a2d57fb
    Firmware Version: CC4C
    User Capacity:    3,000,592,982,016 bytes [3.00 TB]
    Sector Sizes:     512 bytes logical, 4096 bytes physical
    Rotation Rate:    7200 rpm
    Device is:        In smartctl database 7.3/5364
    ATA Version is:   ATA8-ACS T13/1699-D revision 4
    SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
    Local Time is:    Sat May 14 11:15:46 2022 BST
    
    ==> WARNING: A firmware update for this drive is available,
    see the following Seagate web pages:
    http://knowledge.seagate.com/articles/en_US/FAQ/207931en
    http://knowledge.seagate.com/articles/en_US/FAQ/223651en
    
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    See vendor-specific Attribute list for marginal Attributes.
    
    General SMART Values:
    Offline data collection status:  (0x82) Offline data collection activity
                                            was completed without error.
                                            Auto Offline Data Collection: Enabled.
    Self-test execution status:      (   0) The previous self-test routine completed
                                            without error or no self-test has ever 
                                            been run.
    Total time to complete Offline 
    data collection:                (  575) seconds.
    Offline data collection
    capabilities:                    (0x7b) SMART execute Offline immediate.
                                            Auto Offline data collection on/off support.
                                            Suspend Offline collection upon new
                                            command.
                                            Offline surface scan supported.
                                            Self-test supported.
                                            Conveyance Self-test supported.
                                            Selective Self-test supported.
    SMART capabilities:            (0x0003) Saves SMART data before entering
                                            power-saving mode.
                                            Supports SMART auto save timer.
    Error logging capability:        (0x01) Error logging supported.
                                            General Purpose Logging supported.
    Short self-test routine 
    recommended polling time:        (   1) minutes.
    Extended self-test routine
    recommended polling time:        ( 332) minutes.
    Conveyance self-test routine
    recommended polling time:        (   2) minutes.
    SCT capabilities:              (0x3085) SCT Status supported.
    
    SMART Attributes Data Structure revision number: 10
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000f   111   099   006    Pre-fail  Always       -       32691408
      3 Spin_Up_Time            0x0003   092   092   000    Pre-fail  Always       -       0
      4 Start_Stop_Count        0x0032   095   095   020    Old_age   Always       -       5771
      5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000f   056   056   030    Pre-fail  Always       -       5042752652810
      9 Power_On_Hours          0x0032   018   018   000    Old_age   Always       -       72350
     10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       143
    183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
    184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
    187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
    188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       3 3 3
    189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
    190 Airflow_Temperature_Cel 0x0022   059   036   045    Old_age   Always   In_the_past 41 (Min/Max 40/43 #4)
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
    192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       141
    193 Load_Cycle_Count        0x0032   082   082   000    Old_age   Always       -       37265
    194 Temperature_Celsius     0x0022   041   064   000    Old_age   Always       -       41 (128 0 0 0 0)
    197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
    240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       7996h+52m+04.717s
    241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       22271818473157
    242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       190867333595423
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.

     

    Link to comment
    On 5/13/2022 at 5:33 PM, bonienl said:

     

    The code allows different formats, I need to check what to correct in the smart command

    (of course doesn't stop you to use your own script)

     

    I have found that smGlue is not written to the smart-one.cfg file.

    Link to comment
    11 minutes ago, SimonF said:

    I have found that smGlue is not written to the smart-one.cfg file.

    Quick look at the code shows it's being included - @bonienl will  have to take a look ;)

    Link to comment
    39 minutes ago, limetech said:

    Quick look at the code shows it's being included - @bonienl will  have to take a look ;)

    Also smartctl_type is missing the mapping of smDevice.

     

    I add this to my version. if ($type && $disk["smDevice"]) $device=$disk["smDevice"] ;

    Link to comment
    1 hour ago, bonienl said:

    I made a PR with a fix, but can't test myself.

    @SimonF are you able to test?

     

    Yes that works.

     

    root@computenode:~# cat /boot/config/smart-one.cfg 
    [ST3000DM001-9YN1_S1F05AM9_2001b4d209d87941a]
    smType="-d megaraid"
    smPort1="16"
    smDevice="sg6"
    smGlue=","
    root@computenode:~# cat /boot/config/smart-one.cfg 
    [ST3000DM001-9YN1_S1F05AM9_2001b4d209d87941a]
    smType="-d areca"
    smPort1="15"
    smDevice="sg6"
    smGlue="/"
    smPort2="2"
    root@computenode:~# 

     

    Edited by SimonF
    • Like 1
    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.