Wednesday, November 18, 2015

Smartd settings for USB and RAID cards


USB Attached Hard Drive:
via raspbian  smartctl 5.41 2011-06-09 r3365 [armv6l-linux-3.12.22+] (local build)

 smartctl -a -d sat /dev/sdb
/etc/smartd.conf contains:
/dev/sda  -a -d sat


Super Micro X7DB8 3ware Inc 9650SE SATA-II RAID PCIe (rev 01)
via Scientific Linux 6.3 smartmontools release 6.3 dated 2014-07-26 at 09:49:11 UTC 
smartctl -a -d 3ware,0 /dev/twa0
 
/etc/smartd.conf contains:
/dev/twa0 -d 3ware,0 -S on -o on -a -I 194 -s (S/../.././19|L/../../3/17|C/../.././11)
/dev/twa0 -d 3ware,1 -S on -o on -a -I 194 -s (S/../.././20|L/../../2/16|C/../.././10)
/dev/twa0 -d 3ware,2 -S on -o on -a -I 194 -s (S/../.././21|L/../../1/15|C/../.././9)
/dev/twa0 -d 3ware,3 -S on -o on -a -I 194 -s (S/../.././22|L/../../4/14|C/../.././8)
/dev/twa0 -d 3ware,4 -S on -o on -a -I 194 -s (S/../.././23|L/../../5/13|C/../.././7)
/dev/twa0 -d 3ware,5 -S on -o on -a -I 194 -s (S/../.././18|L/../../6/12|C/../.././6)
/dev/twa0 -d 3ware,6 -S on -o on -a -I 194 -s (S/../.././16|L/../../7/11|C/../.././5)
/dev/twa0 -d 3ware,7 -S on -o on -a -I 194 -s (S/../.././14|L/../../7/10|C/../.././4)
 

Cisco C220M3 LSI Logic / Symbios Logic MegaRAID SAS 2008 [Falcon] (rev 03)

 
smartctl -a -d sat+megaraid,2 /dev/sda

/etc/smartd.conf contains:
/dev/sda -a -d sat+megaraid,3
/dev/sda -a -d sat+megaraid,2

I notice on Cisco machines of the same vintage, some are numbered different.
Some have 2,3 for disk #s, some have 8,9, try different numbers.
It seems inconsistent which makes writing a static smartd.conf file hard for these machines.

Supermicro X8ST3 LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)
smartd[26209]: Monitoring 26 ATA and 0 SCSI devices
/etc/smartd.conf
DEVICESCAN -H -S on -o on -a -I 194 -s (S/../.././5|L/../../6/4|C/../.././6)




smartd.conf:
DEVICESCAN -H -S on -o on -a -I 194 -s (S/../.././5|L/../../6/4|C/../.././6)

Dell with 4 disks in a PERC6i
/dev/sda -a -d megaraid,0
/dev/sda -a -d megaraid,1
/dev/sda -a -d megaraid,2
/dev/sda -a -d megaraid,3 
 
 
Standard Sata Disks with no RAID card:
smartd.conf:
DEVICESCAN -H -S on -o on -a -I 194 -s (S/../.././5|L/../../6/4|C/../.././6)
 


http://www.gazj.co.uk/2011/01/25/smart-through-usb-controllers/

Friday, November 6, 2015

Full Stack Linux Tuning

Here is a list of things I tune on RHEL6 linux servers with 10g ethernet and dell PERC raid cards running a RAID6.

/usr/local/sbin/10gtxqueuelen.p1p1.sh
/usr/local/sbin/set_irq_affinity.p1p1.sh
echo noop > /sys/block/sdb/queue/scheduler
/usr/local/sbin/10gtxqueuelen.p1p2.sh
/usr/local/sbin/set_irq_affinity.p1p2.sh
/usr/local/sbin/10gtxqueuelen.bond0.sh

$ cat /usr/local/sbin/10gtxqueuelen.p1p1.sh
ifconfig p1p1 txqueuelen 10000

$ cat /usr/local/sbin/set_irq_affinity.p1p2.sh
#!/bin/bash
/usr/local/sbin/set_irq_affinity.sh p1p2


set_irq_affinity.sh

https://gist.github.com/syuu1228/4352382


Megaraid tuning for dell perc6 servers:
 http://mycusthelp.info/LSI/_cs/AnswerPreview.aspx?sSessionID=6624973237SOJMBBDMCFLZRNJDJQAXSSBVDAYBNA&inc=8273

$ uname -r
2.6.32-431.11.2.el6.x86_64

So our kernel is new enough, however by default our kernel does not use 6.12 or newer:

$ modinfo megaraid_sas
filename:       /lib/modules/2.6.32-431.11.2.el6.x86_64/kernel/drivers/scsi/megaraid/megaraid_sas.ko
description:    LSI MegaRAID SAS Driver
author:         megaraidlinux@lsi.com
version:        06.700.06.00-rh1
license:        GPL
srcversion:     9426C5CDA69586AABE13C02
alias:          pci:v00001000d0000005Fsv*sd*bc*sc*i*
alias:          pci:v00001000d0000005Dsv*sd*bc*sc*i*
alias:          pci:v00001000d0000005Bsv*sd*bc*sc*i*
alias:          pci:v00001028d00000015sv*sd*bc*sc*i*
alias:          pci:v00001000d00000413sv*sd*bc*sc*i*
alias:          pci:v00001000d00000071sv*sd*bc*sc*i*
alias:          pci:v00001000d00000073sv*sd*bc*sc*i*
alias:          pci:v00001000d00000079sv*sd*bc*sc*i*
alias:          pci:v00001000d00000078sv*sd*bc*sc*i*
alias:          pci:v00001000d0000007Csv*sd*bc*sc*i*
alias:          pci:v00001000d00000060sv*sd*bc*sc*i*
alias:          pci:v00001000d00000411sv*sd*bc*sc*i*
depends:
vermagic:       2.6.32-431.11.2.el6.x86_64 SMP mod_unload modversions
parm:           max_sectors:Maximum number of sectors per IO command (int)
parm:           msix_disable:Disable MSI-X interrupt handling. Default: 0 (int)
parm:           msix_vectors:MSI-X max vector count. Default: Set by FW (int)
parm:           throttlequeuedepth:Adapter queue depth when throttled due to I/O timeout. Default: 16 (int)
parm:           resetwaittime:Wait time in seconds after I/O timeout before resetting adapter. Default: 180 (int)


So some how you have to download the newer driver in order to spread the interrupts from your raid card across all CPUS...