SMART tests with smartctl
rahul-Inspiron-3542 ~ # smartctl --info /dev/sda | grep 'SMART support is:'
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
or
rahul-Inspiron-3542 ~ # smartctl -i /dev/sda | grep 'SMART support is:'
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
rahul-Inspiron-3542 ~ # smartctl -H /dev/sda
smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
To enable'
smartctl -s on -d ata /dev/sda
Run overall-health self-assessment test, enter:
smartctl -d ata -H /dev/sda
The following will provide even more information about failing hard disk: # smartctl --attributes --log=selftest /dev/sda
You can read more data from hard disk by typing the following command: # smartctl -d ata -a /dev/sda
Task: Extended self-test of drive
You need to begin an extended self-test of drive /dev/hdc. You can issue this command on a running system. The results can be seen in the self-test log visible with the '-l selftest' option after it has completed:# smartctl -d ata -t long /dev/sdb
A note about RAID controller
To look at ATA disks behind 3ware SCSI RAID controllers, the syntax is:# smartctl -a -d 3ware,2 /dev/sda
# smartctl -a -d 3ware,0 /dev/twe0
For adaptec check the o/p of lsscsci
SATA Health Check Disk Syntax
# smartctl -d sat --all /dev/sgX
# smartctl -d sat --all /dev/sg1
Run test:
# 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
Sample outputs:
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.
# /usr/StorMan/arcconf getconfig 1 | grep State
# /usr/StorMan/arcconf getconfig 1 | grep -B 3 State
Sample outputs:
---------------------------------------------------------------------- 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
+++++++++++++++++++++++++++++++++++++
Adaptec
for i in `ll /dev/sg* | awk '{print $NF}'`; do echo "smart result for $i "; smartctl -a -d scsi --all $i -H; echo "-----------------------------" ; done
3Ware
smartctl -a -d 3ware,N /dev/twax
x-controller number
N-drive number
Megaraid+
storcli /c0 /eall /sall show
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
—————————————————————————
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp
—————————————————————————
252:0 10 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:1 11 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:2 9 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:3 8 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:4 12 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:5 14 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:6 13 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
252:7 15 Onln 0 930.390 GB SATA HDD N N 512B ST1000DM003-9YN162 U
—————————————————————————
smartctl -a -d megaraid,N /dev/sda
For SATA disk, use the following syntax
smartctl -a -d sat+megaraid,N /dev/sda
RAID-Controller | Linux | FreeBSD | NetBSD | OpenBSD | MacOS | Solaris | Windows |
---|---|---|---|---|---|---|---|
LSI 3ware SATA RAID controller | -d 3ware,N /dev/twX 1. | -d 3ware,N /dev/twX 2. | - | - | - | - | /dev/sdX,N 3. |
Areca SATA[/SAS] RAID controller | -d areca,N[/E] /dev/sgX 4. | -d areca,N[/E] /dev/arcmsrX 11. | - | - | - | - | -d areca,N[/E] /dev/arcmsrX 12. |
HighPoint RocketRAID SATA RAID controller | -d hpt,L/M/N /dev/sdX 5. | -d hpt,L/M/N /dev/hptX 6. | - | - | - | - | - |
CCISS (HP/Compaq Smart Array Controller) | -d cciss,N /dev/cciss/cXd0 7. | -d cciss,N /dev/cissX | - | - | - | - | - |
LSI MegaRAID SAS RAID controller Dell PERC 5/i,6/i controller | -d megaraid,N /dev/sdX 8. | /dev/passX 9. | - | - | - | - | /dev/csmiX,N 13. |
Intel ICHxR RAID (Intel Rapid/Matrix Storage) | /dev/sdX | /dev/adX | ? | ? | ? | ? | /dev/csmiX,N 10. |
Adaptec SAS RAID controller (devices supported by aacraid driver) | -d aacraid,H,L,ID /dev/sdX14. | - | - | - | - | - | -d aacraid,H,L,ID /dev/sdX15. |
Comments
Post a Comment