Hi,
I've CentOS5 box with 3ware RAID controller in it. I can't get the tw_cli command line tool to work, and smartd also barks on me. The tw_cli simply doesn't see the controller, no errors logged anywhere.
When starting smartd, it is much more verbose. I'm getting a bunch of messages like this:
Oct 9 22:15:15 toporko kernel: program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO Oct 9 22:15:15 toporko kernel: 3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools. Oct 9 22:15:15 toporko last message repeated 5 times Oct 9 22:15:15 toporko smartd[29238]: Device: /dev/sda [3ware_disk_00], not found in smartd database. Oct 9 22:15:15 toporko smartd[29238]: Device: /dev/sda [3ware_disk_00], ATA IDENTIFY DEVICE words 82-83 don't specify if SMART capable. Oct 9 22:15:15 toporko smartd[29238]: Device: /dev/sda [3ware_disk_00], proceeding since '-T permissive' Directive given. Oct 9 22:15:15 toporko kernel: program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO Oct 9 22:15:15 toporko kernel: 3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools. Oct 9 22:15:15 toporko last message repeated 5 times Oct 9 22:15:15 toporko kernel: program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO Oct 9 22:15:15 toporko kernel: 3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools. Oct 9 22:15:15 toporko kernel: 3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools. Oct 9 22:15:15 toporko smartd[29238]: The SMART RETURN STATUS return value (smartmontools -H option/Directive) can not be passed through the 3ware 3w-xxxx driv er. This can be fixed by applying a simple 3w-xxxx driver patch that can be found here: http://smartmontools.sourceforge.net/ Alternatively, upgrade your 3w-xx xx driver to version 1.02.00.037 or greater.
The configuration file for smartd looks like this:
/dev/sda -d 3ware,0 -a -m root -T permissive /dev/sda -d 3ware,1 -a -m root -T permissive
I do remember smartd and tw_cli working in the past. However, last time I used them was so long ago that I don't remember if it was before or after upgrade from CentOS4 to CentOS5.
Is it possible to get tw_cli and smartd into working condition on CentOS5 box?
Thanks, Alex
On Fri, Oct 10, 2008 at 7:41 AM, Aleksandar Milivojevic alex@milivojevic.org wrote: ...snip...
The configuration file for smartd looks like this:
/dev/sda -d 3ware,0 -a -m root -T permissive /dev/sda -d 3ware,1 -a -m root -T permissive
I do remember smartd and tw_cli working in the past. However, last time I used them was so long ago that I don't remember if it was before or after upgrade from CentOS4 to CentOS5.
Is it possible to get tw_cli and smartd into working condition on CentOS5 box?
This is what I use in smartd.conf :
/dev/twa0 -H -m root -d 3ware,0 -s S/../../7/04 /dev/twa0 -H -m root -d 3ware,1 -s S/../../7/04 /dev/twa0 -H -m root -d 3ware,2 -s S/../../7/04
Also, tw_cli just works for me. Maybe you should do a firmware upgrade of your 3ware controller.
Regards, Tim
Thanks to Tim Verhoeven who pointed me towards the right direction.
I've checked 3ware web site, and found newer version of tw_cli, which worked. It also created /dev/twe* devices (I have an "older" 8006-2LP card, newer cards use twa* devices). That solved problem with tw_cli tool.
For smartd, I had to change /dev/sda to /dev/twe0 (I guess in the past specifying /dev/sda in smartd.conf worked too). However, than SELinux kicked in. The problem was that tw_cli created devices but did not set correct context for them (they inherited it from parent dir). Running restorecon on /dev/twe* solved the problem partially (on reboot, the devices were gone, of course). I've found some references that smartd was supposed to create devices on startup if /dev/twe0 is used in smartd.conf, but it didn't do it my case. Hm, maybe it does it for twa devices only, who knows... Anyhow, I solved both problems (device creation during boot and setting correct SELinux context) fast and dirty way, by creating nodes in /etc/udev/devices with correct permissions and SELinux context.
I've also found this relevant bug: https://bugzilla.redhat.com/show_bug.cgi?id=232218
Looks like the bug was resolved by hacking smartmontool. Though, I wish they went with original proposal and fixed the device driver instead, so that udev would automatically create devices during boot if 3ware card is present in the system.
Once again, thanks to Tim for pointing me into right direction.