2013/03/20

MicroServerのディスクが逝ったでござるの巻


TimeMachineとして運用しているMicroServerのpoolのステータスを確認してみた。

root@hogehoge:~# zpool status -v
  pool: mypool
 state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
  scan: scrub repaired 0 in 15h25m with 0 errors on Mon Mar 18 11:53:40 2013
config:

        NAME        STATE     READ WRITE CKSUM
        mypool      DEGRADED     0     0     0
          raidz1-0  DEGRADED     0     0     0
            c2t0d0  ONLINE       0     0     0
            c2t1d0  ONLINE       0     0     0
            c2t2d0  ONLINE       0     0     0
            c2t3d0  FAULTED      0     0     0  too many errors   

errors: No known data errors


ん?!

c2t3d0の状態が

あやしい。


んじゃ、ディスク交換するかね。とアキバで調達してきた。

予算の都合で中古ですが。


息子の妨害をかいくぐって作業開始!

まずはディスクを交換する前にあやしいc2t3d0をofflineにする。

root@hogehoge:~#zpool offline mypool c2t3d0

shutdownしてディスクを交換する。

root@hogehoge:~#shutdown -y -i5 -g0


あたらしいc2t3d0をonlineにする。

root@hogehoge:~# zpool online mypool c2t3d0
warning: device 'c2t3d0' onlined, but remains in faulted state
use 'zpool clear' to restore a faulted device


ステータスを確認するがまだ状態が変わっていない…。

root@hogehoge:~# zpool status -v
  pool: mypool
 state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
  scan: scrub repaired 0 in 15h25m with 0 errors on Mon Mar 18 11:53:40 2013
config:

        NAME        STATE     READ WRITE CKSUM
        mypool      DEGRADED     0     0     0
          raidz1-0  DEGRADED     0     0     0
            c2t0d0  ONLINE       0     0     0
            c2t1d0  ONLINE       0     0     0
            c2t2d0  ONLINE       0     0     0
            c2t3d0  FAULTED      0     0     0  too many errors

errors: No known data errors


ん?

action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
     
書いてありました。


早速、

root@hogehoge:~# zpool clear mypool

もう一回確認すると、


root@hogehoge:~# zpool status -v
  pool: mypool
 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://illumos.org/msg/ZFS-8000-2Q
  scan: scrub repaired 0 in 15h25m with 0 errors on Mon Mar 18 11:53:40 2013
config:

        NAME        STATE     READ WRITE CKSUM
        mypool      DEGRADED     0     0     0
          raidz1-0  DEGRADED     0     0     0
            c2t0d0  ONLINE       0     0     0
            c2t1d0  ONLINE       0     0     0
            c2t2d0  ONLINE       0     0     0
            c2t3d0  UNAVAIL      0     0     0  cannot open

errors: No known data errors



今度は少しメッセージが変わった。
マニュアル参照してみると今度はc2t3d0を換えたというコマンドを発行してやる必要があるらしい。

root@hogehoge:~# zpool replace mypool c2t3d0

もう一度確認。

root@hogehoge:~# zpool status -v
  pool: mypool
 state: DEGRADED
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 Wed Mar 20 20:40:14 2013
    21.7M scanned out of 2.34T at 2.41M/s, 281h59m to go
    5.35M resilvered, 0.00% done
config:

        NAME              STATE     READ WRITE CKSUM
        mypool            DEGRADED     0     0     0
          raidz1-0        DEGRADED     0     0     0
            c2t0d0        ONLINE       0     0     0
            c2t1d0        ONLINE       0     0     0
            c2t2d0        ONLINE       0     0     0
            replacing-3   DEGRADED     0     0     0
              c2t3d0/old  FAULTED      0     0     0  corrupted data
              c2t3d0      ONLINE       0     0     0  (resilvering)

errors: No known data errors

リビルトが始まった。ZFSのディスク交換は簡単でした。


2012/12/02

【python3】urllib メモ

python3 urllibモジュールの使い方のメモ

>>>import urllib.request
>>>res = urllib.request.urlopen('http://www.yahoo.co.jp/')
>>>html = res.read()
>>>u = res.decode('utf-8','strict')

2012/09/29

アニキの一発!! ヤクルト-阪神21回戦観戦記の巻

読売の優勝も決定し、秋風が吹く神宮球場でヤクルト-阪神戦を観てきました。

ヤクルトファン1名と阪神ファン3名でバックネット裏で観戦ですが、座った早々、阪神先発のスタンリッジの立ち上がりを攻略して大量5点を先制。

阪神ファンが応援用のユニフォームに着替える間もなくの先制に関西弁の怒気を含んだ声が神宮に木霊します。

2012/09/25

Microserverをキャビネットに入れてみたの巻

Time Machineとして生を受けてから早、数ヶ月、獅子奮迅の活躍を見せているMicroserver。しらばっくれて家人のiMacの隣に鎮座させていたのですが、大方の予想通り、

あんたこれいつ片付けるの? 邪魔なんだよね。



大号令

が発せられました。