> 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/shou-ce-ye/xi-tong-guan-li-ming-ling-system-administration-8/zpool-offline.8.md).

# zpool-offline(8)

## 名称

`zpool-offline` — 将 ZFS 存储池中的物理设备下线

`zpool-online(8)` 是 `zpool-offline(8)` 的历史别名。

## 概述

```sh
zpool offline [--power | [-ft]] 池名 设备…
```

```sh
zpool online [--power] [-e] 池名 设备…
```

## 说明

### `zpool offline [--power | [-ft]] 池名 设备…`

将指定的物理设备下线或强制置为故障。在设备下线或被强制置为故障期间，不会尝试对其进行读写。dRAID 热备盘不能下线，也不能强制置为故障。传统热备盘仅在其处于活动状态时才能下线或强制置为故障。

#### `--power`

关闭存储机箱中该设备插槽的电源。该选项目前仅在 Linux 上有效。

#### `-f`

强制置为故障。不将磁盘下线，而是将其置为故障状态。除非指定 `-t` 选项，否则该故障状态在池重新导入后仍会保持。

#### `-t`

临时生效。重启后，指定的物理设备会恢复到先前的状态。

### `zpool online [--power] [-e] 池名 设备…`

使指定的物理设备上线。此命令不适用于热备盘。

#### `--power`

为存储机箱中该设备的插槽通电，并等待设备出现后再尝试使其上线。也可以设置 `ZPOOL_AUTO_POWER_ON_SLOT` 环境变量以始终启用此行为。该选项目前仅在 Linux 上有效。

#### `-e`

扩展设备以使用全部可用空间。如果该设备属于某个镜像或 raidz，则必须先扩展所有设备，新空间才能供存储池使用。

## 参考文献

zpool-detach(8)、zpool-remove(8)、zpool-reopen(8)、zpool-resilver(8)

2023 年 12 月 21 日


---

# 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/shou-ce-ye/xi-tong-guan-li-ming-ling-system-administration-8/zpool-offline.8.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.
