JosefJezek
1/31/2014 - 2:45 PM

SMART HDD

SMART HDD

SMART HDD

  • Reallocated_Sector_Ct - number of sectors moved due to an error on the disk
  • UDMA_CRC_Error_Count - number of errors between the controller and the disk
  • Raw_Read_Error_Rate
  • Seek_Error_Rate
  • Temperature_Celsius

Install smartmontools

  • yum install smartmontools
  • apt-get install smartmontools snmp-mibs-downloader

Bash script

# check_smart.sh sat+megaraid,0 /dev/sda Reallocated_Sector_Ct
echo `smartctl -A -d $1 $2 | awk -v ATTRIBUTE_NAME=$3 '$0 ~ ATTRIBUTE_NAME {print $10}'`

Install MegaRAID MegaCLI

How to read the SMART values of the drive in RAID

  • /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll | grep 'Device Id'
  • megacli -pdlist -a0 | grep 'Device Id'
  • smartctl -d sat+megaraid,4 -a /dev/sda
  • smartctl -d megaraid,4 -a /dev/sda