Synology DSMの外部デバイス(USB接続)のS.M.A.R.T.情報とS.M.A.R.T.テストが使えるようになるのは何時になるか分からない。それまでの間、HDDのHealth管理が出来ないのは心配である。
前回、Synology DS218+にUSBで接続したSeagate IronWolf 4TB HDDのS.M.A.R.T.情報を得る事が出来るようになった。command line で、short、conveyance、long test を実施し、Synology DSMの標準機能で定期的に実施するように設定してみた。
smartctl -c の結果
# smartctl -c -d sat /dev/sdq smartctl 6.5 (build date Sep 7 2018) [x86_64-linux-4.4.59+] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 591) seconds. Offline data collection capabilities: (0x73) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. No Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 1) minutes. Extended self-test routine recommended polling time: ( 640) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x50bd) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported.
それぞれのテストに要する時間が分かる。
- Short self-test 1分
- Extended self-test 640分
- Conveyance self-test 2分
S.M.A.R.T. short test 実行結果
# smartctl --test=short -d sat /dev/sdq ~省略~ === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === Sending command: "Execute SMART Short self-test routine immediately in off-line mode". Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 1 minutes for test to complete. Test will complete after Sat Nov 17 23:41:19 2018 Use smartctl -X to abort test. Smartctl: Failed to inform synostoraged when testing. # smartctl -l selftest -d sat /dev/sdq ~省略~ === START OF READ SMART DATA SECTION === 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% 95 -
S.M.A.R.T. conveyance test 実行結果
conveyance testとは輸送中に障害を受けやすい箇所を確認するテスト、らしい。
# smartctl --test=conveyance -d sat /dev/sdq ~省略~ === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === Sending command: "Execute SMART Conveyance self-test routine immediately in off-line mode". Drive command "Execute SMART Conveyance self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 2 minutes for test to complete. Test will complete after Sun Nov 18 00:03:26 2018 Use smartctl -X to abort test. # smartctl -l selftest -d sat /dev/sdq ~省略~ === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Conveyance offline Completed without error 00% 96 - # 2 Short offline Completed without error 00% 95 -
S.M.A.R.T. long test 実行結果
self-test はHDD本体内で行うテストなので、一旦テストを開始したら放っておいてOK。止めたい場合のみ -X で終了する。long testは時間を要するので、Synology DS218+の省電力設定とHDDハイバネーションをOFFにしておく(一度失敗した…)。
# smartctl --test=long -d sat /dev/sdq ~省略~ === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === Sending command: "Execute SMART Extended self-test routine immediately in off-line mode". Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 640 minutes for test to complete. Test will complete after Sun Nov 18 10:48:24 2018 Use smartctl -X to abort test. Smartctl: Failed to inform synostoraged when testing. # smartctl -l selftest -d sat /dev/sdq ~省略~ === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 112 - # 2 Extended offline Aborted by host 90% 96 - # 3 Conveyance offline Completed without error 00% 96 - # 4 Short offline Completed without error 00% 95 -
#2はhibernationして失敗した記録で、#1が成功した結果である。
S.M.A.R.T self-testの結果
3種類実施して全て問題なし。初期不良はなく、継続使用して大丈夫だと思う。
Synology DSMで定期的な実施
linux的にはcronで実行なのだろうけど、Synology DSMに倣ったやり方でやってみた。
- Synology DSMのコントロールパネルから「タスクスケジューラー」を選択、「作成」「予約タスク」「ユーザー指定のスクリプト」を選択
- 「全般」のタスク名は適当に(日本語不可)、ユーザーはrootで。
- 「スケジュール」の日付は適当な日から毎週繰り返すようにして、時間は適当に。
- 「タスク設定」は通知をONにしてメールアドレスを指定、ユーザー指定のスクリプトには次の内容を記載した。
smartctl --test short -d sat /dev/sdq sleep 120 smartctl -l selftest -d sat /dev/sdq
- OKで保存して、作成したタスクを選んで実行すると、ちゃんとself-testの回数が増加して実施されていた。
- 「操作」の「結果の表示」で正常に終了したかどうかが分かる。(が、stdout/stderrの情報は記録されない^_^;)
- メールアドレスを指定しておけば、実行結果が送られてくるので確認できる。#1の結果がCompleted without errorになっていれば問題なし。
まとめ
Synology DSMでS.M.A.R.T.対応と認識されないUSB HDDでも、smartctlとタスクスケジューラーを組み合わせる事で short self-testが定期的に実施できた。これで異常があればメールで察知できるようになる。この状態で暫く運用してみる。
補足 HDDの温度履歴
# smartctl -x -d sat /dev/sdq
でHDDの温度履歴を取得できた。以下、長いので抜粋する。
~省略~ SCT Temperature History Version: 2 Temperature Sampling Period: 3 minutes Temperature Logging Interval: 59 minutes Min/Max recommended Temperature: 0/ 0 Celsius Min/Max Temperature Limit: 0/ 0 Celsius Temperature History Size (Index): 128 (109) Index Estimated Time Temperature Celsius ~省略~ 95 2018-11-18 02:52 31 ************ 96 2018-11-18 03:51 27 ******** 97 2018-11-18 04:50 30 *********** 98 2018-11-18 05:49 28 ********* 99 2018-11-18 06:48 25 ****** 100 2018-11-18 07:47 30 *********** 101 2018-11-18 08:46 35 **************** 102 2018-11-18 09:45 36 ***************** 103 2018-11-18 10:44 36 ***************** 104 2018-11-18 11:43 35 **************** ... ..( 2 skipped). .. **************** 107 2018-11-18 14:40 35 **************** 108 2018-11-18 15:39 32 ************* 109 2018-11-18 16:38 31 ************ ~省略~
long self-test時、最大36℃まで上がっていた。
Seagate 内蔵ハードディスク 3.5インチ 4TB 高耐久 NAS サーバー ゲーム 映像編集向け IronWolf NAS ( SATA / 3年保証 ) 正規代理店品 ST4000VN008
- 出版社/メーカー: SEAGATE
- 発売日: 2016/09/16
- メディア: Personal Computers
- この商品を含むブログを見る