トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS


ソフトウェア:smartmontools 5.33
OS(作業日):VineLinux2.6 Kernel 2.2.17 (2004-11-01)


ソフトウエア解説
HDDのS.M.A.R.T.をコントロールするツール群です。


導入

  • 必要なもの
    特になし
  • インストール ()
    # ./configure
    # make
    # make install

使い方

SMART機能の操作は「smartctl」コマンドを利用する。SMARTからの情報の取得、および設定の更新ができる。

  • show information
    Diskの情報を表示するには「-i」オプションを利用する。対象のHDDに対してSMARTが有効になっているかを確認することができる。
    # smartctl -i /dev/hda
    
    smartctl version 5.33 [i686-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/
    
    === START OF INFORMATION SECTION ===
    Device Model:     IC35L060AVV207-0
    Serial Number:    VNVB01G2R0RV5D
    Firmware Version: V22OA63A
    User Capacity:    61,492,838,400 bytes
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   6
    ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 3a
    Local Time is:    Mon Oct 11 17:15:57 2004 JST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
  • enable SMART
    さきほどのDisk情報確認において、SMART機能がEnableになっていない場合は次のようにEnableにする。
    # smartctl -s on /dev/hda
    
    smartctl version 5.33 [i686-pc-linux-gnu] Copyright (C) 2002-4 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/
    
    === START OF ENABLE/DISABLE COMMANDS SECTION ===
    SMART Enabled.
  • 簡易テスト
    現在のDiskの状態をテストするには「-H 」で行う。
    # smartctl -H /dev/hda
    
    smartctl version 5.33 [i686-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/  
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
  • 詳細情報の取得
    # smartctl -A /dev/hda
    smartctl version 5.33 [i686-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
    Home page is http://smartmontools.sourceforge.net/ 
    
    === START OF READ SMART DATA SECTION ===
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED   WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000b   100   100   060    Pre-fail  Always       -       0
      2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
      3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       159 (Average 169)
      4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       37
      5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
      8 Seek_Time_Performance   0x0005   100   100   020    Pre-fail  Offline      -       0
      9 Power_On_Hours          0x0012   098   098   000    Old_age   Always       -       16317
     10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       37
    192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       715
    193 Load_Cycle_Count        0x0012   100   100   050    Old_age   Always       -       715
    194 Temperature_Celsius     0x0002   134   134   000    Old_age   Always       -       41 (Lifetime Min/Max 15/49)
    196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
    197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

Raw_Read_Error_Rate,
Reallocated_Sector_Ct,代替されたセクタ数

常時監視

smartデーモンを常駐させることで、常時HDDの情報をsmartから取得監視することができる。Read/Writeエラーの発生時など通知される。

  • デーモンの設定
    hdaを監視し問題発生時に指定のアドレスにメールを送信するには次のように設定する。設定方法はインストール時導入されるサンプル設定ファイルにコメントが詳しい。
    /usr/local/etc/smrtd.conf
    /dev/hda -a -m root@localhost
    デーモンの起動
    /usr/local/sbin/smartd
  • 通知サンプル
    Subject: SMART error (CurrentPendingSector) detected on host: inasa
    From: root@localhost (root)
    To: root@localhost
    Date: Wed, 11 Jan 2006 04:29:07 +0900 (JST)
    
    This email was generated by the smartd daemon running on: 
    
       host name: inasa
       DNS domain: [Unknown]
       NIS domain: (none)
    
    The following warning/error was logged by the smartd daemon:
    
    Device: /dev/hda, 1 Currently unreadable (pending) sectors
    
    For details see host's SYSLOG (default: /var/log/messages).
    
    You can also use the smartctl utility for further investigation.
    No additional email messages about this problem will be sent.

参考文献
[0] http://www.sgtpepper.net/hyspro/diary/20040309.html
[1] http://www.atmarkit.co.jp/flinux/rensai/linuxtips/521smartinfo.html
[2] http://smartmontools.sourceforge.net/
[3] http://sourceforge.net/project/showfiles.php?group_id=64297

Counter: 6650, today: 2, yesterday: 1