08 December 2006

Linux : SATA HDD で SMART が使えないエラーの対処

Fedora Core 5 で SATA HDD は /dev/sdx としてマウントされている。(前バージョンから変更されている。名前空間はSCSIでもlibataを使うPATAディスクには違いない)
余波として、最大パーティション数が16個に制限されたり、すんなりと SMART データを吐き出してくれなかったりする。

smartctl は、何もオプションを付けないとエラーになる


[root@wslnx-111 ~]# smartctl -a /dev/sda
smartctl version 5.36 [i686-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: ATA ST3250823AS Version: 3.03
Serial number: 5ND0JB4Z
Device type: disk
Local Time is: Fri Dec 8 13:05:22 2006 JST
Device does not support SMART

Error Counter logging not supported

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging
[root@wslnx-111 ~]#

SCSIとしてアクセスするからエラーになるのであって、その思い込みを(プログラムの作り込み不足?)を解き放ってやるとよいのかもしれない。


[root@wslnx-111 ~]# smartctl -a -d ata /dev/sda
smartctl version 5.36 [i686-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.8 family
Device Model: ST3250823AS
Serial Number: 5ND0JB4Z
Firmware Version: 3.03
User Capacity: 250,059,350,016 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Dec 8 13:06:57 2006 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.

〜 中略 〜

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

[root@wslnx-111 ~]#

ちなみに、 smartd の方は、なにもしなくてもちゃんと認識しているよう(エラーを出していないため)なので、現行バージョンの smartctl コマンドの方だけの問題なのだろうか。


[root@wslnx-111 ~]# /etc/rc.d/init.d/smartd restart
smartd を停止中: [ OK ]
smartd を起動中: [ OK ]

[root@wslnx-111 ~]# tail /var/log/messages
Dec 8 13:10:30 wslnx-111 smartd[3152]: smartd is exiting (exit status 0)
Dec 8 13:10:30 wslnx-111 smartd[3339]: smartd version 5.36 [i686-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Dec 8 13:10:30 wslnx-111 smartd[3339]: Home page is http://smartmontools.sourceforge.net/
Dec 8 13:10:30 wslnx-111 smartd[3339]: Opened configuration file /etc/smartd.conf
Dec 8 13:10:30 wslnx-111 smartd[3339]: Configuration file /etc/smartd.conf parsed.
Dec 8 13:10:30 wslnx-111 smartd[3339]: Device: /dev/sda, opened
Dec 8 13:10:31 wslnx-111 smartd[3339]: Device: /dev/sda, found in smartd database.
Dec 8 13:10:31 wslnx-111 smartd[3339]: Device: /dev/sda, is SMART capable. Adding to "monitor" list.
Dec 8 13:10:31 wslnx-111 smartd[3339]: Monitoring 1 ATA and 0 SCSI devices
Dec 8 13:10:31 wslnx-111 smartd[3341]: smartd has fork()ed into background mode. New PID=3341.

[root@wslnx-111 ~]#