smartmontools インストール
sudo apt install -y smartmontools
sudo yum install -y smartmontools
smartctl で RAW_VALUE確認
セルフテスト実施
sudo /usr/sbin/smartctl -t short /dev/sdb
# 2分待ってから以下。
sudo /usr/sbin/smartctl -A -l selftest /dev/sdb
# sudo /usr/sbin/smartctl -a /dev/sda | egrep "^ID|^ 5|^197|^#"
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 9
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
# 1 Short offline Completed without error 00% 50626 -
16進数を10進数に変換
echo "obase=10; ibase=16; AF5" | bc
SMARTが無効になっている場合、有効
SMART support is: Disabled
SMART Disabled. Use option -s with argument 'on' to enable it.
# /usr/sbin/smartctl -s on /dev/sda
smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.18.7-200.fc21.x86_64] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
注意 の次は 異常
-
生の値
(16進)を気にすること。
不良セクタ
正常時
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 50626 -
異常時
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 90% 11982 1717550205
# 2 Short offline Completed: read failure 90% 11982 1717574320
shortテスト中
# 1 Short offline Self-test routine in progress 30% 35538 -
Raidカード
Raidカードの PERC S100/S300
はlinuxのドライバがない