SMART Errors for 3Ware Raid Cards
-
Using 3Ware raid card, and when trying to use any of the "Diagnostics -> SMART Status" this error comes back:
smartctl 5.39.1 2010-01-28 r3054 [FreeBSD 8.1-RELEASE-p2 i386] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net Smartctl open device: /dev/da0 failed: AMCC/3ware controller, please try adding '-d 3ware,N', you may need to replace /dev/da0 with /dev/twaN or /dev/tweN
-
To update:
The 3ware card is a 9650SE with 4 drives in a raid-5
Using shell, the following command works:
smartctl -a /dev/twa0 -d 3ware,N
Where N equals: 0, 1, 2, 3 (or however many drives are attached to the card)
On the SMART Status page, the drop down menu is not listing twa0
-
If you type "atacontrol list" or "camcontrol devlist" does twa show up in the output?
I could add twa to the list of types (now it only shows ad and da) but if I can find a more general solution that doesn't require hardcoding, that would be ideal.
-
Sorry for the long delay. Crazy week. I was replying on a machine at work, and haven't hit submit yet.
To sum up, "atacontrol list" does not yield any results for drives on a 3ware, and I cannot get smartctl or smartd to list devices. One option I found on a man page was –scan, but it doesn't work.
I will post more info in a day or two as I am still testing a few things. Might have a "patch" that doesn't require hard coding here in a day or two since I have a system with a 3ware card. Though I wouldn't say patch, more of a shell script. whatever. :)
I'll post it when it's working and you can do whatever you want with it. Â 8)
Cheers.
(edit: and where is camcontrol at? I didn't see it in /bin, /sbin, /usr/sbin....is it in /usr/local somewhere?)
-
camcontrol should be in /sbin but it's possible we don't include it on the builds.
I keep thinking that somewhere we have some code/logic to find all "disks" and I can reuse it, but I haven't found it yet, though I haven't done any intensive searching yet.
Edit: Looks like "/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list" is promising.
-
to my own knowledge on 3ware adapters, smartmontools never report back any drive-info. I have some of this adapters installed on several systems, including linux and nowhere this info can be extracted. Only way is via the 3ware tools from the manufacturer. They have Freebsd-installers there, but only freebsd 7.
-
camcontrol should be in /sbin but it's possible we don't include it on the builds.
I keep thinking that somewhere we have some code/logic to find all "disks" and I can reuse it, but I haven't found it yet, though I haven't done any intensive searching yet.
Edit: Looks like "/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list" is promising.
I didn't see it in /sbin, but no worries. (Is there a 2.0 build that includes this? Might be a cleaner way to discover attached 3ware cards…)
note: some of these questions are just reminders for me to look at tomorrow, some I will find the answer on my own. but feel free to answer or comment :)
I'll check out "pc-sysinstall.sh disk-list" tomorrow at work [as that is where my system with the 3ware is]. Is this script ran during install [only]? and/or during each bootup? Where/How does it save the discovered information, and format/syntax?
If it is promising but not complete, I'll use that as my base and post a patch. If not I can write up a real quick script that can list the drives, and be a bit more dynamic as well. (and then you guys can integrate in whatever way you see fit)
Either way I am hoping to get this in the 2.0 release :) (or shortly after… 8))
Cheers.
-
I would be surprised if a 3ware card yielded any per-drive info to generic scsi tools, as it is a HW raid controller and presents a single scsi drive to the host.
-
smartmontools has specific code to get data from 3ware, areca, and some others.
-
With the tools available in the 2.0b4, this script accurately list all devices attached to most 3ware cards in a system.
I have tested it with 2 different cards simultaneously, with a wide arrangement of disk on the second card. I'm just storing the results in a .txt file for now since I don't have time today to look for a more integrated way.
$maxDriveSize can be lowered to 23 for example, as most cards do not have more then 24 ports. (where port 1 is always = 0)
With having it set at 127, it takes about 2 to 3 seconds to scan two 3ware cards in full. Setting it to 24 takes 1 to 2 seconds#!/bin/sh #used to discover each drive installed on 3ware RAID controllers. #max number of drives that smartctl can list for 3ware is from 0 to 127. maxDriveSize="127" #discovers any 3ware controller and stores in array. controllerArray="`/usr/sbin/devinfo | grep twa && /usr/sbin/devinfo | grep twe && /usr/sbin/devinfo | grep twl`" for eachDevice in $controllerArray do #each controller has it's own file with a list of drives in it. #can substitute .txt file for mysql, conf, or some other format. controllerDB="3Ware_$eachDevice.txt" #clear contents, and puts controller name (ex. twa0) on first line. echo "$eachDevice" > $controllerDB i=0 while [ $i -le $maxDriveSize ] do #run smartctl on every possible device attached to a card, and store which one is SMART enabled. activeDrive="`smartctl -a /dev/$eachDevice -d 3ware,$i | grep "support" | grep "Enabled" | awk '{print $4}'`" if [ "$activeDrive" = "Enabled" ] then #adds drive ID number to the attached controller file/db. #this line may change depending on what storage format the drive listings / #are being placed in. echo $i >> $controllerDB fi i=$(( $i + 1 )) done done exit 0
After this has ran, the output of file 3Ware_twa0.txt is:
(4 drive raid5)twa0 0 1 2 3
And output of file 3Ware_twa1.txt is:
(connected drives to random ports, and made a raid0 for testing)twa1 0 2 3 5 6 7
Let me know if there is anything else you want me to try, do, script, whatever. 8)
Hope this helps to get better support for 3Ware in 2.0 RCÂ :)Cheers.
-
smartmontools has specific code to get data from 3ware, areca, and some others.
ah, learn something new every day :)