> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/zfs/zfs-xiao-xi/zfs-8000-2q.md).

# 消息 ID：ZFS-8000-2Q

## 冗余配置中设备缺失

|  类型  | 错误             |
| :--: | -------------- |
|  严重性 | 重要             |
|  描述  | 冗余配置中的某个设备无法打开 |
| 自动响应 | 如果可用，将激活热备用    |
|  影响  | 存储池不再提供配置的冗余级别 |

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

### 对于活动池

如果在运行 `zpool import` 时遇到此错误，请参见下文。否则，请运行 `zpool status -x` 来确定哪个池出现故障：

```sh
# zpool status -x
  pool: test
 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: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-2Q
 scrub: none requested
config:

        NAME                  STATE     READ WRITE CKSUM
        test                  DEGRADED     0     0     0
          mirror              DEGRADED     0     0     0
            c0t0d0            ONLINE       0     0     0
            c0t0d1            FAULTED      0     0     0  cannot open

errors: No known data errors
```

通过查找带有“cannot open”消息的 FAULTED（故障）设备来确定哪个设备无法打开。如果该设备被意外从系统中移除，请附加该设备，然后使用 `zpool online` 将其上线：

```sh
# zpool online test c0t0d1
```

如果设备不再可用，可使用 `zpool replace` 命令替换该设备：

```sh
# zpool replace test c0t0d1 c0t0d2
```

如果设备已被同一物理插槽中的另一块磁盘替换，则可以使用命令 `zpool replace` 的单参数形式进行替换：

```sh
# zpool replace test c0t0d1
```

现有数据将被 resilver 到新设备。resilver 完成后，旧设备将从池中移除。

### 对于已导出的池

如果在 `zpool import` 期间遇到此错误，表示系统未附加某个设备：

```sh
# zpool import
  pool: test
    id: 10121266328238932306
 state: DEGRADED
status: One or more devices are missing from the system.
action: The pool can be imported despite missing or damaged devices.  The
        fault tolerance of the pool may be compromised if imported.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-2Q
config:

        test              DEGRADED
          mirror          DEGRADED
            c0t0d0        ONLINE
            c0t0d1        FAULTED   cannot open
```

与池在系统上处于活动状态时不同，池处于导出状态时无法替换设备。如果设备可以附加到系统，请附加设备并再次运行 `zpool import`。

还可以按原样导入池，但由于缺失设备，池将处于 DEGRADED（降级）状态。该设备将被标记为 UNAVAIL（不可用）。导入池后，可以按上述方法替换缺失设备。

## 详细信息

消息 ID：`ZFS-8000-2Q` 表示 ZFS 子系统无法打开某个设备。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/zfs/zfs-xiao-xi/zfs-8000-2q.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
