<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>hana  saki  hoko  ru: Tag s.m.a.r.t</title>
    <link>http://hana.sakihoko.ru/articles/tag/s.m.a.r.t?tag=s.m.a.r.t</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>ruby rails debian daily</description>
    <item>
      <title>SMART support is: Disabledだった場合</title>
      <description>&lt;p&gt;smartでHDDの状態を見ようと思ったら、こんなメッセージが。。。&lt;/p&gt;

&lt;pre&gt;
# smartctl -d ata --all /dev/hda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     HDS725050KLAT80
Serial Number:    KRVA25ZBHE41EH
Firmware Version: K2AOAB0A
User Capacity:    500,107,862,016 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 1
Local Time is:    Sat Dec 15 15:35:15 2007 JST
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.
&lt;/pre&gt;

&lt;p&gt;SMARTがdisableになっているとの事なので、指示通りに、-sオプションを
つけてみることに。&lt;/p&gt;

&lt;pre&gt;
# smartctl -s on /dev/hda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
&lt;/pre&gt;

&lt;p&gt;
これで、無事取得できた。
&lt;/p&gt;</description>
      <pubDate>Sun, 16 Dec 2007 00:54:00 +0900</pubDate>
      <guid isPermaLink="false">urn:uuid:e10137da-9a8c-41b1-b020-00eedf28040c</guid>
      <author>ryusendo</author>
      <link>http://hana.sakihoko.ru/articles/2007/12/16/smart-support-is-disabled%E3%81%A0%E3%81%A3%E3%81%9F%E5%A0%B4%E5%90%88</link>
      <category>linux and debian</category>
      <category>s.m.a.r.t</category>
      <trackback:ping>http://hana.sakihoko.ru/articles/trackback/6457</trackback:ping>
    </item>
    <item>
      <title>S.M.A.R.Tメモ</title>
      <description>&lt;p&gt;
Serial ATAのdisk診断する場合のコマンドメモ
&lt;/p&gt;

&lt;pre&gt;
%sudo smartctl -d ata -a /dev/sda  
&lt;/pre&gt;

&lt;p&gt;
Serial ATAの場合は 「-d」オプションを付ける
&lt;/p&gt;

&lt;p&gt;
HDDのエラーを見たい場合は、「-l error」オプションを付ける
&lt;/p&gt;

&lt;pre&gt;
% sudo smartctl -l error -d ata /dev/sda                                                                                                                                                
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
No Errors Logged
&lt;/pre&gt;

&lt;p&gt;
こんな感じでエラーログがあるかないかを見る事が出来る。　いづれもkernel 2.6.15以上でないと駄目なので注意ね。 etchなら問題なく出来るはず。
&lt;/p&gt;

&lt;p&gt;
debianの場合は「smartmontools」パッケージをインストールすれば使える
&lt;/p&gt;

&lt;p&gt;
ちなみに、エラーがある場合は、以下のようなログが出る。非常に残念な事態。
&lt;/p&gt;

&lt;pre&gt;
SMART Error Log Version: 1
ATA Error Count: 2
        CR = Command Register [HEX]
        FR = Features Register [HEX]
        SC = Sector Count Register [HEX]
        SN = Sector Number Register [HEX]
        CL = Cylinder Low Register [HEX]
        CH = Cylinder High Register [HEX]
        DH = Device/Head Register [HEX]
        DC = Device Command Register [HEX]
        ER = Error register [HEX]
        ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 2 occurred at disk power-on lifetime: 1939 hours (80 days + 19 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 00 5e 99 77 e0  Error: ICRC, ABRT at LBA = 0x0077995e = 7838046

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 57 99 77 e0 00      10:47:44.491  READ DMA EXT
  25 00 08 87 c9 78 e0 00      10:47:44.479  READ DMA EXT
  25 00 08 77 3b 7b e0 00      10:47:44.477  READ DMA EXT
  25 00 08 97 94 7c e0 00      10:47:44.475  READ DMA EXT
  25 00 08 3f 44 7e e0 00      10:47:44.464  READ DMA EXT

Error 1 occurred at disk power-on lifetime: 1928 hours (80 days + 8 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 1f 52 2d a6 e0  Error: ICRC, ABRT 31 sectors at LBA = 0x00a62d52 = 10890578

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 71 2c a6 e0 00   1d+12:34:14.968  READ DMA EXT
  25 00 00 71 2a a6 e0 00   1d+12:34:14.942  READ DMA EXT
  25 00 00 71 29 a6 e0 00   1d+12:34:15.243  READ DMA EXT
  25 00 00 71 27 a6 e0 00   1d+12:34:15.229  READ DMA EXT
  25 00 00 71 25 a6 e0 00   1d+12:34:15.220  READ DMA EXT
&lt;/pre&gt;</description>
      <pubDate>Mon, 03 Dec 2007 12:13:00 +0900</pubDate>
      <guid isPermaLink="false">urn:uuid:4bdf11af-e304-4ee6-9510-fa7924dfcfb0</guid>
      <author>ryusendo</author>
      <link>http://hana.sakihoko.ru/articles/2007/12/03/s-m-a-r-t%E3%83%A1%E3%83%A2</link>
      <category>pc and server</category>
      <category>s.m.a.r.t</category>
      <trackback:ping>http://hana.sakihoko.ru/articles/trackback/5151</trackback:ping>
    </item>
  </channel>
</rss>
