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

# zpool-condense(8)

## 名称

`zpool-condense` — 压缩、刷新、垃圾回收或以其他方式清理池元数据

## 概述

```sh
zpool condense [-t 类型] [-c | w] -a | 池名…
```

```sh
zpool condense --types
```

## 说明

许多池内部元数据更新都会在后台执行，其速率经过特意选择，以限制对池正常使用的性能影响。有时最好能加速这些操作，即便这会影响整体性能。`condense` 允许管理员请求将某个特定的后台操作提升优先级，使其尽快完成。

### `-t`、`--type`

要压缩的内容。未指定时将压缩所有类型。以下是 `type` 的可能取值：

#### `log_spacemap`

将 log spacemap（日志空间映射）条目刷新到底层的 metaslab。

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

对所有池开始、取消或等待压缩。

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

取消先前的 `condense`。这将使后台更新恢复到正常速率。

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

等待压缩完成后再返回。

### `--types`

列出此 `condense` 构建所支持的压缩类型。

## 示例

### 示例 1

log\_spacemap 压缩进行中的池状态：

```sh
# zpool condense -t log_spacemap
# zpool status
  pool: tank
  state: ONLINE
  condense: log_spacemap: condensing, 104/321 metaslabs done in 00:00:15
  ...
```

## 参考文献

zpool-status(8)、zpool-wait(8)

2026 年 5 月 26 日


---

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