ZFSでリハウス 続

233時間かかるかと思われた(^^; 同期は、実際のところ6時間半くらいで終わってた、らしい(寝てたし)。ここからが地獄の始まりだったのでした。。。
shutdownして、今度はad4側も新しいHDDにして、起動。。。

No bootable device found. insert boot disk and press any key.

ぐはぁ。BIOSでad6のboot順を先にしてみたりしたがダメ。pmbrの書き込みに失敗してたのか、そもそもad4からしか起動できないのか、日頃の行いが悪いのか。
予定では、ad6から起動して、ad4にGPT切って、zpool replaceのはずだったのだけど、起動しないのではしょうがない。手元にあったfreeNASのUSBイメージで起動して、GPTを切ったのだが、肝心のpoolは、freeNASはFreeBSD-7ベースでZFSがv6なので、8-STABLEで作ったZFS 13のpoolが見えず。
8.1-BETA1のmemstickを作ってUSB起動し、Fixitで見たところ。。。見えた。

Fixit# kldconfig /dist/boot/kernel
Fixit# zpool import
  pool: pool1
    id: 123456789
 state: DEGRADED
status: One of more devices are missing from the system.
action: The pool can be imported despite missing or dameged devices.  The
        fault tolerance of the pool may be compromised if imported.
   see: http://www.sun.com/msg/ZFS-xxxx-xx
config:

        NAME             STATE
        pool1            DEGRADED
          mirror         DEGRADED
            replacing    DEGRADED
              ad6p2/old  OFFLINE
              ad6p2      OFFLINE
            ad4p2        UNAVAIL  cannot open

では、と、importしてみたら、-fをつけろと怒られた。

Fixit# zpool import -R /mnt -f pool1
Fixit# zpool list
NAME   SIZE  USED  AVAIL    CAP  HEALTH  ALTROOT
pool1  931G  874G  50.8G    93%  DEGRADED  /mnt
Fixit# zpool status
  pool: pool1
 state: DEGRADED
status: One of 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-xxxx-xx
 scrub: none requested
config:

        NAME             STATE     READ WRITE CKSUM
        pool1            DEGRADED     0     0     0
          mirror         DEGRADED     0     0     0
            replacing    DEGRADED     0     0     0
              ad6p2/old  OFFLINE      0 1.28K     0
              ad6p2      ONLINE       0     0     0
            1234567890   UNAVAIL      0 3.27K     0  was /dev/ad4p2

errors: No known data errors

そういえば、前はofflineにしてから取り外したけど、今回はいきなり取り替えちゃったが、それが悪かった?

Fixit# zpool replace pool1 /dev/ad4p2
Fixit# zpool status
  pool: pool1
 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.
 scrub: resilver in progress for 0h8m, 0.27% done, 10h57m to go
config:

        NAME             STATE     READ WRITE CKSUM
        pool1            DEGRADED     0     0     0
          mirror         DEGRADED     0     0     0
            replacing    DEGRADED     0     0     0
              ad6p2/old  OFFLINE      0 3.48K     0
              ad6p2      ONLINE       0     0     0  24.7M resilvered
            replacing    DEGRADED     0     0     0
              123456789  UNAVAIL      0 3.48K     0  was /dev/ad4p2
              ad4p2      ONLINE       0     0     0  2.53M resilvered

errors: No known data errors

OFFLINEとUNAVAILのは、どうやったら消えるんだろう。zpool clearか?