ZFSプールから破損したZILディスクを削除する方法

ZFSプールから破損したZILディスクを削除する方法

2つのミラー化ハードドライブとログ用のRAMディスクを備えたZFSプールがあります。私のシナリオでは、ログディスクが破損しています。

# zpool status -x tank
  pool: tank
 state: FAULTED
status: An intent log record could not be read.
    Waiting for adminstrator intervention to fix the faulted pool.
action: Either restore the affected device(s) and run 'zpool online',
    or ignore the intent log records by running 'zpool clear'.
   see: http://illumos.org/msg/ZFS-8000-K4
  scan: none requested
config:

    NAME                    STATE     READ WRITE CKSUM
    tank                    FAULTED      0     0     0
      mirror-0              ONLINE       0     0     0
        ada0                ONLINE       0     0     0
        ada1                ONLINE       0     0     0
    logs
      6324139563861643487   UNAVAIL      0     0     0  was /dev/md1

今私は欲しい不足しているログの削除プールから死んだデバイスを削除しますが、次のことはできません。

# zpool clear -F tank 6324139563861643487
cannot clear errors for 6324139563861643487: one or more devices is currently unavailable

また、プールをオンラインに切り替えることはできません。

# zpool remove tank 6324139563861643487 
cannot open 'tank': pool is unavailable

意図ログを無視する方法は?

ベストアンサー1

破損したデバイスプールをインポートするオプションがあります。彼女は私がプールを復元した方法です。

# zpool export tank
# zpool import -m tank
# zpool status tank
  pool: tank
 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: none requested
config:

NAME                    STATE     READ WRITE CKSUM
tank                    DEGRADED     0     0     0
 mirror-0              ONLINE       0     0     0
   gpt/disk1           ONLINE       0     0     0
   gpt/disk2           ONLINE       0     0     0
logs
 6324139563861643487   UNAVAIL      0     0     0  was /dev/md1
cache
 gpt/disk3             ONLINE       0     0     0

errors: No known data errors
# zpool clear tank
# zpool remove tank 6324139563861643487
# zpool status tank
  pool: tank
 state: ONLINE
  scan: none requested
config:

NAME                    STATE     READ WRITE CKSUM
tank                    ONLINE       0     0     0
 mirror-0              ONLINE       0     0     0
   gpt/disk1           ONLINE       0     0     0
   gpt/disk2           ONLINE       0     0     0
cache
 gpt/disk3             ONLINE       0     0     0

errors: No known data errors

おすすめ記事