# 消息 ID：ZFS-8000-72

## 池元数据损坏

|  类型  | 错误           |
| :--: | ------------ |
|  严重性 | 紧急           |
|  描述  | 打开池所需的元数据已损坏 |
| 自动响应 | 不会采取自动响应     |
|  影响  | 池不再可用        |

## 建议系统管理员采取的操作

即使所有设备都可用，磁盘上的数据已被破坏，导致池无法打开。如果提供恢复操作，池可以恢复到可用状态。否则，池内的所有数据将丢失，必须销毁池并从适当的备份源恢复。ZFS 包含内置的元数据复制功能，即使是未复制的池也能防止这种情况发生，但在复制配置下运行将降低未来发生此类情况的可能性。

如果在 `zpool import` 期间遇到此错误，请参见下节。否则，请运行 `zpool status -x` 以确定哪个池出现故障以及是否有恢复选项：

```sh
# zpool status -x
  pool: test
    id: 13783646421373024673
 state: FAULTED
status: The pool metadata is corrupted and cannot be opened.
action: Recovery is possible, but will result in some data loss.
        Returning the pool to its state as of Mon Sep 28 10:24:39 2009
        should correct the problem.  Approximately 59 seconds of data
        will have to be discarded, irreversibly.  Recovery can be
        attempted by executing 'zpool clear -F test'.  A scrub of the pool
        is strongly recommended following a successful recovery.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-72
config:

        NAME                  STATE     READ WRITE CKSUM
        test                  FAULTED      0     0     2  corrupted data
            c0t0d0            ONLINE       0     0     2
            c0t0d1            ONLINE       0     0     2
```

如果无法恢复，推荐的操作将是销毁池并从备份恢复。

如果在 `zpool import` 期间遇到此错误，且未提到恢复选项，则池无法恢复且无法导入。必须从适当的备份源恢复池。如果有恢复选项，`zpool import` 的输出将如下所示：

```sh
# zpool import share
cannot import 'share': I/O error
        Recovery is possible, but will result in some data loss.
        Returning the pool to its state as of Sun Sep 27 12:31:07 2009
        should correct the problem.  Approximately 53 seconds of data
        will have to be discarded, irreversibly.  Recovery can be
        attempted by executing 'zpool import -F share'.  A scrub of the pool
        is strongly recommended following a successful recovery.
```

恢复操作通过在 `zpool clear` 或 `zpool import` 上使用选项 `-F` 请求。恢复将导致部分数据丢失，因为它会将池恢复到先前状态。可以通过添加选项 `-n` 执行模拟恢复检查，以确认是否可以恢复，而不实际将池恢复到先前状态。

## 详细信息

消息 ID：`ZFS-8000-72` 表示由于检测到池元数据损坏，池无法打开。
