[[Rsync de backup]]
#contents
*smartd[5262]: [#y57fd282]
 Jul 23 15:07:55 G7 smartd[5262]: Device: /dev/ada1, WARNING: There are known problems with these drives,
 Jul 23 15:07:55 G7 smartd[5262]: see the following Seagate web pages:
 Jul 23 15:07:55 G7 smartd[5262]: http://knowledge.seagate.com/articles/en_US/FAQ/207931en
 Jul 23 15:07:55 G7 smartd[5262]: http://knowledge.seagate.com/articles/en_US/FAQ/207963en
 Jul 23 15:07:56 G7 smartd[5262]: Device: /dev/ada3, WARNING: There are known problems with these drives,
 Jul 23 15:07:56 G7 smartd[5262]: THIS DRIVE MAY OR MAY NOT BE AFFECTED,
 Jul 23 15:07:56 G7 smartd[5262]: see the following web pages for details:
 Jul 23 15:07:56 G7 smartd[5262]: http://knowledge.seagate.com/articles/en_US/FAQ/207931en
 Jul 23 15:07:56 G7 smartd[5262]: http://knowledge.seagate.com/articles/en_US/FAQ/207951en
 Jul 23 15:07:56 G7 smartd[5262]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632758

*** portinstall sysutils/smartmontools [#z1a915a8]

 /bin/mkdir -p /usr/local/etc/periodic/daily
 install  -o root -g wheel -m 555 /usr/ports/sysutils/smartmontools/work/smart /usr/local/etc/periodic/daily/smart
 smartmontools has been installed
 
 To check the status of drives, use the following:
 
         /usr/local/sbin/smartctl -a /dev/ad0    for first ATA/SATA drive
         /usr/local/sbin/smartctl -a /dev/da0    for first SCSI drive
         /usr/local/sbin/smartctl -a /dev/ada0   for first SATA drive
 
 To include drive health information in your daily status reports,
 add a line like the following to /etc/periodic.conf:
         daily_status_smart_devices="/dev/ad0 /dev/da0"
 substituting the appropriate device names for your SMART-capable disks.
 
 To enable drive monitoring, you can use /usr/local/sbin/smartd.
 A sample configuration file has been installed as
 /usr/local/etc/smartd.conf.sample
 Copy this file to /usr/local/etc/smartd.conf and edit appropriately
 
 To have smartd start at boot
 
        echo 'smartd_enable="YES"' >> /etc/rc.conf
 
 ===>   Compressing manual pages for smartmontools-5.42_4
 ===>   Registering installation for smartmontools-5.42_4
 ===>  Cleaning for smartmontools-5.42_4

http://nhh.mo-blog.jp/ttt/2006/06/smartmontools_0720.html


http://www.kkaneko.com/rinkou/freebsd/smartmontoolsfreebsd.html
***         echo 'smartd_enable="YES"' >> /etc/rc.conf [#va21e2b9]
↑するか、もしくは、↓
/etc/rc.conf
 smartd_enable="YES"
**接続されているHDDのデバイス名を調べる [#z4100d91]
 guard# atacontrol list
 ATA channel 0:
     Master:      no device present
     Slave:       no device present
 ATA channel 1:
     Master:      no device present
     Slave:       no device present
 ATA channel 2:
     Master:  ad4 <WDC WD1602ABYS-19B7A0/02.03B03> SATA revision 2.x
     Slave:       no device present
 ATA channel 3:
     Master:      no device present
     Slave:       no device present
 ATA channel 4:
     Master:      no device present
     Slave:       no device present
 ATA channel 5:
     Master: acd0 <HL-DT-ST DVDROM DH20N/NC04> SATA revision 1.x
     Slave:       no device present
おまけ
 guard# atacontrol cap ad4
とするとシリアル番号、モデル名なども表示します。

**接続されているHDDのデバイス名を調べる FreeBSD 9.0R 以降 [#g0f0f5e9]
FreeBSD 9.0R以降では、
 # atacontrol list
 atacontrol: 
 ATA_CAM option is enabled in kernel.
 Please use camcontrol instead.

デフォルトで ATA to CAM が有効になってて、camcontrol を使ってねってことになったった。

 G7# camcontrol devlist
 <VB0250EAVER HPG7>                 at scbus0 target 0 lun 0 (ada0,pass0)
 <ST3500320NS SN05>                 at scbus0 target 1 lun 0 (ada1,pass1)
 <Hitachi HDS721050CLA362 JP2OA39C>  at scbus1 target 0 lun 0 (ada2,pass2)
 <ST3500320AS SD15>                 at scbus1 target 1 lun 0 (ada3,pass3)
 <hp DVDROM DH40N IS01>             at scbus3 target 0 lun 0 (cd0,pass4)


***(オプション)/etc/periodic.conf の設定 [#o0685287]
smartctl コマンドで表示される状況レポートに, 日毎レポート (dairy status reports) を含めたいときは, /etc/periodic.conf に次のような1行を含めておく. 「/dev/ad0 /dev/da0」の部分は監視したいドライブ名に設定すること.

/etc/periodic.conf
 daily_status_smart_devices="/dev/ad0 /dev/da0"
G7だと
 daily_status_smart_devices="/dev/ada0 /dev/ada1 /dev/ada2 /dev/ada3"


ドライブの監視 (monitoring) を行いたいときは,設定ファイル /usr/local/etc/smartd.conf を作成すること. 

※ サンプルが /usr/local/etc/smartd.conf.sample にある


** smartmontoolsの設定 [#h7e8a3e6]
http://nhh.mo-blog.jp/ttt/2006/06/smartmontools_0720.html
/usr/local/etc/smartd.conf.sample という設定ファイルがあるので、smartd.confというファイル名でコピーして、中身を書き換えます。

 # cd /usr/local/etc/
 # cp smartd.conf.sample smartd.conf
 # ls -l smartd.conf
 -r--r--r--  1 root  wheel  4890 Jun 12 22:59 smartd.conf
 # chmod +w smartd.conf
 # vi smartd.conf
 
 # cp /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf

smartd.confに、ぎっしりと、いろんな情報が書いてあるので、それを読めば、だいたい、どう設定すればいいのかわかります。また、「man smartd.conf」でマニュアルも見られます。

smartd.confで設定すべきポイントは、2つくらいかな。

*** 「DEVICESCAN」という行をコメントアウトする [#jadba409]

DEVICESCANという行以降に書いてある内容は、無視されるそうです。

 # The word DEVICESCAN will cause any remaining lines in this
 # configuration file to be ignored:

*** ディスクドライブごとにチェック項目を書いていく [#v0e418a1]

実はよくわかってないのですが(無責任ですみません)、smartd.confの中にサンプルがたくさん書かれているので、それをまねして、以下のように書きました。

guard の場合は
 /dev/ad4 -a -o on -S on -s (S/../.././03|L/../../6/07) -H -m root
 guard# /usr/local/etc/rc.d/smartd start
G7だと、
 /dev/ada0 -a -o on -S on -s (S/../.././03|L/../../6/07) -H -m root
 /dev/ada1 -a -o on -S on -s (S/../.././04|L/../../6/08) -H -m root
 /dev/ada2 -a -o on -S on -s (S/../.././05|L/../../6/09) -H -m root
 /dev/ada3 -a -o on -S on -s (S/../.././06|L/../../6/10) -H -m root

&ref(IMG_20120626_144826.jpg{, [zoom], [50%]});
&ref(http://piano2nd.smb.net/~kuji/pukiwiki-1.4.7/index.php?plugin=attach&pcmd=open&file=IMG_20120626_144826.jpg&refer=HDD%E7%AE%A1%E7%90%86%20sysutils%2Fsmartmontools);

SATAのハードディスクが4台つながっていて、ada0~ada3として認識されてるので、4行書いているのですが、1台だけなら/dev/ada0の行だけで十分。

「-s」で、自己診断テスト(self-test)を定期的に行うように指定する。short testとか、longテストとか、いろいろあるらしい。
「-m root」で、エラーが発生したら、rootあてにメールを送る。
というような意味らしいです。
*** smartctlコマンドで、ドライブの情報を読み出す [#jce36a73]

# smartctl -a /dev/ada6

*areca raid board [#v198872f]

 # smartctl -a /dev/da0
 smartctl 6.4 2015-06-04 r4109 [FreeBSD 9.3-RELEASE-p24 amd64] (local build)
 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
 
 === START OF INFORMATION SECTION ===
 Vendor:               Areca
 Product:              ARC-1210-VOL#00
 Revision:             R001
 User Capacity:        239,999,647,744 bytes [239 GB]
 Logical block size:   512 bytes
 Rotation Rate:        10000 rpm
 Logical Unit id:      0x0004d927fffff800
 Serial number:        0000000442740780
 Device type:          disk
 Transport protocol:   Fibre channel (FCP-2)
 Local Time is:        Thu Sep  3 17:09:51 2015 JST
 SMART support is:     Available - device has SMART capability.
 SMART support is:     Enabled
 Temperature Warning:  Disabled or Not Supported
 
 === START OF READ SMART DATA SECTION ===
 SMART Health Status: OK
 
 Current Drive Temperature:     30 C
 Drive Trip Temperature:        25 C
 
 Manufactured in week 30 of year 2002
 Specified cycle count over device lifetime:  4278190080
 Accumulated start-stop cycles:  256
 Elements in grown defect list: 0
 
 Error counter log:
            Errors Corrected by           Total   Correction     Gigabytes    Total
                ECC          rereads/    errors   algorithm      processed    uncorrected
            fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
 read:          0        0         0         0          0          0.000           0
 write:         0        0         0         0          0          0.000           0
 
 Non-medium error count:        0
 
 Device does not support Self Test logging


https://www.freebsd.org/cgi/man.cgi?query=smartctl&sektion=8&manpath=FreeBSD+Ports+9.2-RELEASE

 areca,N  -  [FreeBSD, Linux, Windows and Cygwin only] the	device
	      consists of one or more SATA disks connected to  an  Areca  SATA
	      RAID controller.	The positive integer N (in the range from 1 to
	      24 inclusive) denotes which disk on the controller is monitored.
	      On FreeBSD use syntax such as:
	      smartctl -a -d areca,2 /dev/arcmsr1
	      smartctl -a -d areca,3 /dev/arcmsr2
	      The  first  line	above  addresses  the second disk on the first
	      Areca RAID controller.  The second line addresses	the third disk
	      on the second Areca RAID controller.
 
	      Important:  the Areca controller must have firmware version 1.46
	      or later.	 Lower-numbered	firmware versions will give (harmless)
	      SCSI error messages and no SMART information.
 
	      areca,N/E	 -  [FreeBSD,  Linux,  Windows	and  Cygwin only] [NEW
	      EXPERIMENTAL SMARTCTL FEATURE] the device	 consists  of  one  or
	      more  SATA  or  SAS  disks  connected  to	an Areca SAS RAID con-
	      troller.	The integer N (range 1 to  128)	 denotes  the  channel
	      (slot)  and  E (range 1 to 8) denotes the	enclosure.  Important:
	      This requires Areca SAS  controller  firmware  version  1.51  or
	      later.

 # smartctl -a -d areca,1 /dev/da0
 smartctl 6.4 2015-06-04 r4109 [FreeBSD 9.3-RELEASE-p24 amd64] (local build)
 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
 
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 Read Device Identity failed: Input/output error
 
 A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.


https://www.smartmontools.org/wiki/Supported_RAID-Controllers

 # smartctl -a -d areca,1 /dev/arcmsr1
 smartctl 6.4 2015-06-04 r4109 [FreeBSD 9.3-RELEASE-p24 amd64] (local build)
 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
 
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 do_scsi_cmnd_io with write buffer failed code = ffffffff
 Smartctl open device: /dev/arcmsr1 [areca_disk#01_enc#01] failed: Input/output error


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