I can use the smartctl -d ata -a /dev/sdb to read hard disk health status directly connected to my system. But, how do I read smartctl command to check disk SAS / SCSI behind Adaptec RAID controller from the shell prompt?
You need to use the following syntax to check SATA or SAS disk which are typically simulate a (logical) disk for each array of (physical) disks to the OS. /dev/sgX can be used as pass through I/O controls providing direct access to each physical disk for Adaptec raid controllers.
SATA Health Check Disk Syntax
# smartctl -d sat --all /dev/sgX
# smartctl -d sat --all /dev/sg1
# smartctl -d sat --all /dev/sg1 -H
For SAS disk use the following syntax:
# smartctl -d scsi --all /dev/sgX
# smartctl -d scsi --all /dev/sg1
# smartctl -d scsi --all /dev/sg1 -H
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Device: SEAGATE ST3146855SS Version: 0002 Serial number: xxxxxxxxxxxxxxx Device type: disk Transport protocol: SAS Local Time is: Wed Jul 7 04:34:30 2010 CDT Device supports SMART and is Enabled Temperature Warning Enabled SMART Health Status: OK Current Drive Temperature: 24 C Drive Trip Temperature: 68 C Elements in grown defect list: 0 Vendor (Seagate) cache information Blocks sent to initiator = 1857385803 Blocks received from initiator = 1967221471 Blocks read from cache and sent to initiator = 804439119 Number of read and write commands whose size <= segment size = 312098925 Number of read and write commands whose size > segment size = 45998 Vendor (Seagate/Hitachi) factory information number of hours powered up = 13224.42 number of minutes until next internal SMART test = 42 Error counter log: Errors Corrected by Total Correction Gigabytes Total ECC rereads/ errors algorithm processed uncorrected fast | delayed rewrites corrected invocations [10^9 bytes] errors read: 58984049 1 0 58984050 58984050 3151.730 0 write: 0 0 0 0 0 9921230881.600 0 verify: 1308 0 0 1308 1308 0.000 0 Non-medium error count: 0 No self-tests have been logged Long (extended) Self Test duration: 1367 seconds [22.8 minutes]
Replace /dev/sg1 with your disk number. If you've raid 10 array with 4 disks than:
- /dev/sg0 - RAID 10 controller (you will not get any info or /dev/sg0).
- /dev/sg1 - First disk in RAID 10 array.
- /dev/sg2 - Second disk in RAID 10 array.
- /dev/sg3 - Third disk in RAID 10 array.
- /dev/sg4 - Fourth disk in RAID 10 array.
Another simple command to just check basic status is as follows:
# /usr/StorMan/arcconf getconfig 1 | grep State
# /usr/StorMan/arcconf getconfig 1 | grep -B 3 State
---------------------------------------------------------------------- Device #0 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #1 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #2 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #3 Device is a Hard drive State : Online
- Monitoring hard disk health with smartd under Linux or UNIX operating systems
- Test If Linux Server SCSI / SATA Hard Disk Going Bad