====== ZFS mirrorのプールがデグレードしていたでござる ====== サーバの共有フォルダに繋がらなくなってしまった。サーバ自体は見えておりpingも通るのだが、いざ繋ごうとするとタイムアウト。その時は家のネットワークを色々弄くっていたので、それが原因かな?と気にも留めなかった。 翌日になっても繋がらなかったので、原因を調べるべくsshしたが一向に応答が帰ってこない。pingは通るのに。コンソールから直接ログインを試みるも、ユーザー名入力後に応答が帰ってこずに撃沈。これはヤバい雰囲気。仕方なく電源リセット。 幸い、問題なく起動しsshも繋がったので調査開始。 まずは /var/log/messages を見てみる。 ... Apr 19 20:24:31 Freyja kernel: mpt0: request 0xffffff800082f3a0:16151 timed out for ccb 0xfffffe0007da2800 (req->ccb 0xfffffe0007da2800) Apr 19 20:25:16 Freyja kernel: mpt0: attempting to abort req 0xffffff800082f3a0:16151 function 0 Apr 19 20:25:16 Freyja kernel: mpt0: mpt_wait_req(1) timed out Apr 19 20:25:16 Freyja kernel: mpt0: mpt_recover_commands: abort timed-out. Resetting controller Apr 19 20:25:16 Freyja kernel: mpt0: mpt_cam_event: 0x80 Apr 19 20:25:16 Freyja kernel: mpt0: mpt_cam_event: 0x80 Apr 19 20:25:16 Freyja kernel: mpt0: completing timedout/aborted req 0xffffff800082f3a0:16151 Apr 19 20:31:14 Freyja kernel: mpt0: request 0xffffff800082c460:17593 timed out for ccb 0xfffffe0007da2800 (req->ccb 0xfffffe0007da2800) Apr 19 20:31:14 Freyja kernel: mpt0: attempting to abort req 0xffffff800082c460:17593 function 0 Apr 19 20:31:18 Freyja kernel: mpt0: completing timedout/aborted req 0xffffff800082c460:17593 Apr 19 20:31:18 Freyja kernel: mpt0: abort of req 0xffffff800082c460:0 completed Apr 19 20:32:42 Freyja kernel: mpt0: request 0xffffff8000833720:17797 timed out for ccb 0xfffffe0007da2800 (req->ccb 0xfffffe0007da2800) Apr 19 20:32:45 Freyja kernel: mpt0: attempting to abort req 0xffffff8000833720:17797 function 0 Apr 19 20:32:45 Freyja kernel: mpt0: completing timedout/aborted req 0xffffff8000833720:17797 Apr 19 20:32:45 Freyja kernel: mpt0: abort of req 0xffffff8000833720:0 completed ... なんかヤバげなログががが。mptってことはHDDが逝っちゃった系・・・? 次にZFSプールの状態を見てみる。 $ zpool status pool: zroot state: DEGRADED status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using 'zpool online'. see: http://www.sun.com/msg/ZFS-8000-2Q scan: scrub repaired 0 in 3h41m with 0 errors on Fri Nov 2 00:13:33 2012 config: NAME STATE READ WRITE CKSUM zroot DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 12202321002681728230 UNAVAIL 0 0 0 was /dev/da0p3 da0p3 ONLINE 0 0 0 errors: No known data errors オフフ、ミラーの片割れがUNAVAILになっとる。本来あるべきada7p3が行方不明。 camcontrol devlistで見てもada7が出てこないので本格的にお亡くなりになった?と考えつつ、最後の望みをかけてマシン開腹&ケーブルチェック。なんか微妙にSATAケーブルが緩かった気がする。いざ起動アーンドzpool status!! pool: zroot state: ONLINE status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Sun Apr 21 11:03:14 2013 1.01G scanned out of 557G at 9.96M/s, 15h52m to go 1.01G resilvered, 0.18% done config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada7p3 ONLINE 0 0 3 (resilvering) da0p3 ONLINE 0 0 0 ktkr!! とりあえず、ハードリセットもしてしまったことだし、他のプールも含めてscrub。問題のプールは560GBで4時間ほど掛かった。 errors: No known data errors pool: zroot state: ONLINE status: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or replace the device with 'zpool replace'. see: http://www.sun.com/msg/ZFS-8000-9P scan: scrub repaired 384K in 4h8m with 0 errors on Sun Apr 21 15:38:59 2013 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada7p3 ONLINE 0 0 6 da0p3 ONLINE 0 0 0 errors: No known data errors よしよし、無事修復出来たようなのでzpool clearでエラーカウントをクリアして完了っと。 しかしSATAケーブルが緩むなんて事あるんだねぇ。ラッチ付きじゃないとあかんな。