Home | About the Adaptec Linux Blog | Adaptec Trusted Storage


Smartmontools and Adaptec RAID controllers

Posted in General by Phil Wilson

Anssi asked :-

 Is there any way to get the full SMART info from a SATA harddisk connected to Adaptec 21610SA RAID adapter?
The usual “smartctl -a /dev/sdX” command fails with aacraid driver.

Hi Anssi, thanks for this question, I’ve been meaning to post some information on this as its a question I’ve had from a few of my European customers. Unfortunately on this generation of controllers, the smartctl commands are not passed through to the disks but starting with the 5-series and recently launched 2-series controllers, the smartmon tools work fine. To use smartmon tools with the 2 or 5 series, you need to

24 Responses to “Smartmontools and Adaptec RAID controllers”

  1. Me Says:

    Um I need to…what exactly?

  2. Phil Wilson Says:

    Oops, I’m very sorry for that ..

    I was intending to say that you need to make sure the physical devices attached to the raid controller are visible to the OS. A cat of /proc/scsi/scsi should confirm this. If they aren’t then check if the driver module supports the parameter expose_physicals=X (where X is 0 for don’t, -1 which for most distributions is the default which exposes them but sets the no_uld_attach flag, or 1 which exposes them and doesn’t protect them which is dangerous).

    Assuming the physical devices are visible, you need the SCSI generic driver loaded and then you can use smartctl with the SCSI generic device node corresponding to the disk of interest. Note that you have to tell smartctl the device type using -d sat || scsi ..

    for SATA disks
    smartctl --all /dev/sg<x> -d sat

    for SAS disks
    smartctl --all /dev/sg<x> -d scsi

    I also like the excellent sg_utils package - sg_scan -i will give you a list of all the devices with their inquiry / identify data.

    Just to reiterate, this works with the series 2 and series 5 controllers but not with the series 3 and older products.

    thanks, Phil

  3. Mohsin Raza Says:

    @Phil

    what about 2820SA?

    I followed your instructions but smartctl is still not working on 2820SA Raid Controller, anything else required for this to work?

  4. Phil Wilson Says:

    Hi Mohsin, I’m sorry about this but smartmontools needs full pass-through support which was only introduced with the series-2 and series-5 controllers (probably the nearest equivalent to the 2820 would be the 5805). It isn’t possible on earlier models. We did have a look at how hard it would be to implement the firmware changes but it just wasn’t practical.

    best regards, Phil

  5. Mohsin Raza Says:

    Thanks for your help!

    Regards,

    Mohsin

  6. Marcel Says:

    Hi,

    and what about the 2405? It’s a Series-2-Controller, but there is no explicit mention of pass-through or something similar.

    Regards

  7. Phil Wilson Says:

    Hi Marcel, yes the series-2 (2405 and 2045) would work okay too. It uses a lower power version of the processor on the series-5 (less memory too) but the firmware and drivers are the same.

    best regards, Phil

  8. Marcel Says:

    Hello,

    that sounds very good! :)

    Thank you!

  9. Philip Tait Says:

    How about an Adaptec 2010 ZCR, using the dpt_i2o driver (kernel 2.4)? Can this work?

  10. Phil Wilson Says:

    Hi Philip, sorry for the long delay in replying to you. I think it is pretty unlikely that this would work. The mechanism takes advantage of the fact the aacraid driver and ARC firmware allow the physical devices to be visible to the OS as SCSI generic devices. I don’t think the same feature was available in the older “B-code” firmware and dpt_i2o driver. If you can see the physical devices in /proc/scsi/scsi and they have SCSI generic device nodes associated with them it would be worth a try. Unfortunately I don’t have this hardware available to test myself.

    Sorry not to be more help, Phil

  11. Markus Says:

    Hi Philip,

    can you tell me if the Adaptec 5445, 5805 or 5085 will work with smartmontools?

    Thanks
    Markus

  12. Vladimir Says:

    Hi !

    How to use smartctl for getting smart-info from sata disk atached to adaptec sas 3405 adapter ?

    If I run “smartctl -a -d sat /dev/sg” or “smartctl -a -d scsi /dev/sg” smart-info is not shown.

    with sas disks is all good.

  13. Vladimir Says:

    Some changes:

    If I run “smartctl -a -d sat /dev/sgX” or “smartctl -a -d scsi /dev/sgX” smart-info is not shown.

  14. Phil Wilson Says:

    Hi Vladimir, I’m sorry for the long delay - been travelling to our head office and then stuck in all day meetings so I’m trying to catch up.

    The way that this works is that smartctl generates an ATA command to retrieve the smart information but because the underlying transport is based on SCSI, it uses the SCSI ATA translation (SAT) command to create a standard SCSI command descriptor block with the ATA command embedded inside it.

    The later generation series-2 and series-5 controllers understand this command (op code 85h) and process the embedded SATA command however the firmware for the series-3 controllers doesn’t support it.

    I went round this with our design engineering group to see if it was possible to add support to the series-3 but it would require a lot of development effort. Its a shame because SAT support adds capability like being able to download microcode to SATA disks through the controllers which has been important to our data centre customers.

    Just as an aside, the next version of the ASM GUI and arcconf CLI program provides new menu options allowing you to download disk microcode to SAS and SATA disks on series-2 and 5 controllers.

    Just a quick heads up for series-2 and series-5 customers who have updated to firmware 16507 (which is only available by contacting our tech support team). This includes some changes to support the new disk firmware flash capabiltiy but has introduced a glitch with smartctl. I’m investigating this but for the time being, if you are using this firmware then you need to add -T permissive to the end of your smartctl command.

    Hope this is a help - welcome any feedback.
    thanks, Phil

  15. Mike Says:

    Hello,

    I have a ICP5085BL and it does not work for me. OS is Ubuntu 9.10, newest firmware.

    mike@host:/dev$ sudo smartctl –all -d sat /dev/sg10
    smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/

    === START OF INFORMATION SECTION ===
    Device Model: [No Information Found]
    Serial Number: [No Information Found]
    Firmware Version: [No Information Found]
    Device is: Not in smartctl database [for details use: -P showall]
    ATA Version is: 1
    ATA Standard is: Exact ATA specification draft version not indicated
    Local Time is: Sat May 30 20:54:03 2009 CEST
    SMART is only available in ATA Version 3 Revision 3 or greater.
    We will try to proceed in spite of this.
    SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don’t show if SMART supported.
    Checking for SMART support by trying SMART ENABLE command.
    SMART ENABLE appeared to work! Continuing.
    SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don’t show if SMART is enabled.
    A mandatory SMART command failed: exiting. To continue, add one or more ‘-T permissive’ options.

    Any ideas?

    Kind regards
    Mike

  16. Mike Says:

    Oh Ubuntu version is 9.04 :)

  17. Phil Wilson Says:

    Hi Mike, sorry for the delay. The ICP 5085BL is a different model to the Adaptec controllers and doesn’t follow the same model numbering convention. It has higher performance but is based on the same code base as the Adaptec series-3. Unfortunately this code base doesn’t support the SAT opcode as mentioned in my previous note. Consequently smartctl would work with SAS disks but not with SATA.

    The controller will still forward any SMART warnings or errors generatedb by the drive to the management software / operating system.

    Sorry for not being clearer over the model numbers - I remember thinking it would be challenging when the Adaptec series-5 controllers were launched.

    many thanks, Phil

  18. Ryan Says:

    Is it possible to use smartctl with a 2420S? If not, what other ways can the health of the individual SCSI drives be monitored?

  19. Ryan Says:

    I answered my own question: modprobe sg and use the /dev/sgX devices instead.

  20. Patrick Says:

    Hey, I was just wondering if this was also possible for the Adaptec ASR-2420SA.
    Reading the information from /dev/sgX results in this message:

    # smartctl –all /dev/sg0 -d sat -T
    smartctl version 5.38 [i486-slackware-linux-gnu] Copyright (C) 2002-8 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/

    =======> ARGUMENT REQUIRED FOR OPTION: T
    =======> VALID ARGUMENTS ARE: normal, conservative, permissive, verypermissive

  21. Phil Wilson Says:

    Hi Patrick, sorry for the delay. I’m not sure about this - I’ll have to give it a try (travelling at the moment so it would be later this week). You could try adding -T permissive on the end. It depends whether the firmware of the 2420 supports the SAT command. If you try - let me know what happens.

    thanks, Phil

  22. Joel Franco Says:

    Thank You by this information.

    I didn’t know that could be possible to take the information passtrough the raid board.

    It could be cool if you publish a table with the raid boards that this method supports; it’s dificul to us, users, to know how to get information from the raid device without open source consolidated tools.

  23. Phil Wilson Says:

    Hi Joel, good point, I’ll try to put together a list of what controllers have which passthrough features. It might take a bit of time as I’ll have to try some of them to determine what is supported.

    The latest controllers - series 2 and series 5 - support SCSI and SAT passthrough and will work with smartmontools for both SATA and SAS disks. There is a driver bug which appears when using the latest firmware documented here with a temporary workaround until a driver fix makes it into distributions.

    http://linux.adaptec.com/2009/07/24/using-smartmontools-538-with-series-255z-controllers-with-firmware-17380-onwards/

    Series-3 controllers support SCSI passthrough but in the standard code as shipped in the channel (non-OEM), do not support SAT passthough smartmontools will work with SAS but not SATA disks.

    many thanks, Phil

  24. Paul Says:

    Patrick, you did not pass any parameter to the -T option.

    Try -T verypermissive

Leave a Reply