Repairing ZFS zpool Damage

Most of time you will see disk failures, but sometime, you may experience a pool metadata damage and that  prevents the pool from being opened or imported, then the following options are available:

Attempt to recover the pool

using the zpool clear -F or zpool import -F
          The commands attempt to roll back the last few pool transactions to an operational state.

For example:

zpool status zpool_2
    NAME        STATE     READ WRITE CKSUM
    zpool_2   DEGRADED      0     0     3  corrupted data
      raidz2-0  DEGRADED     0     0    12
        c0t3    ONLINE       0     0     0
        c1t2    ONLINE       0     0     0
        c1t3    ONLINE       0     0     0
        c2t2    ONLINE       0     0     0
        c2t3    ONLINE       0     0     0
        c3t2    ONLINE       0     0     0
        c3t3    ONLINE       0     0     0
        c4t2    ONLINE       0     0     0
        c4t3    ONLINE       0     0     0
        c5t2    ONLINE       0     0     0
        c5t3    FAULTED      0     0     0  corrupted data

To fix it, run

zpool clear -F zpool_2

If you are importing a damaged pool

# zpool import zpool_2
cannot import 'zpool_2': I/O error

To fix it, run

zpool import -F zpool_2

If the pool cannot be recovered by the pool recovery method described above, you probably have to restore the pool and all its data from a backup copy.

First, save the configuration, use

zpool status <pool>

Second, run

zpool destroy <pool>

Third,recreate the zpool(using the info from first step)

Then, data recovery from backup