> 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-initialize.8.md).

# zpool-initialize(8)

## 名称

`zpool-initialize` — 向 ZFS 存储池的未分配区域写入数据

## 概述

```sh
zpool initialize [-c | -s | -u] [-w] [-z] -a | 池名 [设备…]
```

## 说明

通过向指定设备上的所有未分配区域写入数据来开始初始化；如果未单独指定设备，则对池中所有符合条件的设备执行。只有叶子数据设备或日志设备才能被初始化。默认会写入非零模式；若要改为写入零，参见 `-z`。

### `-a`、`-all`

在所有池上开始、取消或暂停初始化。

### `-c`、`-cancel`

取消对指定设备（未指定设备时为所有符合条件的设备）的初始化。如果一个或多个目标设备无效或当前未在初始化，该命令将失败，且不会对任何设备执行取消操作。

### `-s`、`-suspend`

暂停对指定设备（未指定设备时为所有符合条件的设备）的初始化。如果一个或多个目标设备无效或当前未在初始化，该命令将失败，且不会对任何设备执行暂停操作。随后可以在相关目标设备上运行不带任何标志的 `zpool initialize` 以恢复初始化。

### `-u`、`-uninit`

清除指定设备（未指定设备时为所有符合条件的设备）上的初始化状态。如果设备正在执行初始化，该命令将失败。清除之后，可以使用不带任何标志的 `zpool initialize` 对相关目标设备上的所有未分配区域重新执行初始化。

### `-w`、`-wait`

等待设备完成初始化后再返回。

### `-z`、`-zero`

向未分配区域写入零，而不是默认的非零模式。这有助于在不支持 TRIM 的精简置备后端存储上回收空间。如果后端存储支持 TRIM，通常 zpool-trim(8) 是将空间归还给它更高效的方式。所选的值按设备记录，因此一次先被暂停、后来又恢复的初始化会继续写入零。

## 参考文献

zpool-add(8)、zpool-attach(8)、zpool-create(8)、zpool-online(8)、zpool-replace(8)、zpool-trim(8)

2026 年 7 月 12 日


---

# 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-initialize.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.
