FreeNASのUSBメモリ、結局交換

[2015/8/8 追記] 再起動したらmissing boot loaderと出て起動しなくなりました。どうやら私の理解が間違っているようです。下記の内容は失敗例として参考にしてください。

先日様子見することにしたLink FreeNASのシステムが入っているUSBメモリですが、昨日ライトエラーを繰り返しZFSから切り離された模様。交換ですな。

まずはda1をOfflineに。
# zpool offline freenas-boot da1p2
データ用デバイスとは異なりこいつにはパーティションが切られているため、新USBメモリ(da2)にパーティションテーブルを複製。da1は壊れているとはいえパーティションテーブルくらいは生きているでしょ…
# gpart backup /dev/da1 | gpart restore /dev/da2
新USBメモリをZFSに組み込み。
# zpool replace freenas-boot /dev/da1p2 /dev/da2p2
Make sure to wait until resilver is done before rebooting.

If you boot from pool 'freenas-boot', you may need to update
boot code on newly attached disk '/dev/da2p2'.

Assuming you use GPT partitioning and 'da0' is your new boot disk
you may use the following command:

        gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
ご丁寧にブートローダーを新メモリに入れる方法を指南してくれ、調べる手間が省ける。
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da2
ZFSの状況確認、再構成中。
# zpool status freenas-boot
  pool: freenas-boot
 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 Sat Aug  8 04:36:30 2015
        296M scanned out of 742M at 807K/s, 0h9m to go
        296M resilvered, 39.84% done
config:

        NAME                                            STATE     READ WRITE CKSUM
        freenas-boot                                    DEGRADED     0     0     0
          mirror-0                                      DEGRADED     0     0     0
            replacing-0                                 OFFLINE      0     0     0
              4340356687696627280                       OFFLINE      0    89     1  was /dev/da1p2/old
              da2p2                                     ONLINE       0     0     0  (resilvering)
            gptid/d7bb72a8-1b95-11e5-b672-000c29a6b2ea  ONLINE       0     0     0

errors: No known data errors
完了
# zpool status freenas-boot
  pool: freenas-boot
 state: ONLINE
  scan: resilvered 743M in 0h19m with 0 errors on Sat Aug  8 04:55:56 2015
config:

        NAME                                            STATE     READ WRITE CKSUM
        freenas-boot                                    ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            da2p2                                       ONLINE       0     0     0
            gptid/d7bb72a8-1b95-11e5-b672-000c29a6b2ea  ONLINE       0     0     0

errors: No known data errors
[参考]

— posted by mu at 04:39 am   commentComment [0]  pingTrackBack [0]

この記事に対する TrackBack URL:

設定によりTB元のページに、こちらの記事への言及(この記事へのリンク)がなければ、TB受付不可となりますのであらかじめご了承下さい。

コメントをどうぞ。 名前(ペンネーム)と画像認証のひらがな4文字は必須で、ウェブサイトURLはオプションです。

ウェブサイト (U):

タグは使えません。http://・・・ は自動的にリンク表示となります

:) :D 8-) ;-) :P :E :o :( (TT) ):T (--) (++!) ?;w) (-o-) (**!) ;v) f(--; :B l_P~ (QQ)

     

[X] [Top ↑]

T: Y: ALL: Online:
ThemeSwitch
  • Basic
Created in 0.3444 sec.
prev
2015.8
next
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31