[kwlug-disc] Reading SMART attributes of storage hardware through LSI RAID adapters

L.D. Paniak ldpaniak at fourpisolutions.com
Wed Jan 8 19:21:18 EST 2014


A question came up at the KWLUG non-meeting this past Monday regarding
the ability of Linux SMART tools to be able to read SMART attributes of
storage hardware behind an LSI RAID controller.  In turns out that
recent versions of smartmontools (version 5.41 included in Ubuntu 12.04
works) have the ability to query through the RAID controller if you ask
correctly:

First use the MegaCli tool from LSI (re.
https://cs.uwaterloo.ca/twiki/view/CF/MegaRaid#Software_notes ) to
identify the "Device Id" of storage hardware attached to a particular
RAID adapter in your system (here adapter 0):

# /opt/MegaRAID/MegaCli/MegaCli64 -PDlist -a0 |grep "Device Id"
Device Id: 26                                                   
Device Id: 23
Device Id: 27
Device Id: 25
Device Id: 31
Device Id: 37

smartctl can query the storage device SMART attributes by Device Id and
virtual drive containing the device in the following way:
# smartctl -d sat+megaraid,26 -a /dev/sdc
which outputs all available SMART data eg.:
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-56-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     INTEL SSDSC2BA400G3
Serial Number:    BTTV323103L0400HGN
LU WWN Device Id: 5 001517 8f36376ad
Firmware Version: 5DV10265
User Capacity:    400,088,457,216 bytes [400 GB]
Sector Size:      512 bytes logical/physical
....

Of particular use for SSDs, one can find out total LBAs written on the
device:
# smartctl -d sat+megaraid,26 -a /dev/sdc |grep "Total_LBAs_Written"
241 Total_LBAs_Written      0x0032   100   100   000    Old_age  
Always       -       2286

Or for Intel SSDs, check the media wearout indicator:
# smartctl -d sat+megaraid,26 -a /dev/sdc |grep "Media_Wearout_Indicator"
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age  
Always       -       0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140108/06dd1505/attachment.bin>


More information about the kwlug-disc mailing list