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

# zpool-upgrade(8)

## 名称

`zpool-upgrade` — 管理 ZFS 存储池的版本与特性标志

## 概述

```sh
zpool upgrade
```

```sh
zpool upgrade -v
```

```sh
zpool upgrade [-V version] -a | 池名…
```

## 说明

### `zpool upgrade`

显示未启用全部受支持特性的存储池，以及使用旧版 ZFS 版本号格式化的存储池。这些池可以继续使用，但某些特性可能不可用。使用 `zpool upgrade -a` 可以在所有池上启用所有特性（受 `-o compatibility` 属性限制）。

### `zpool upgrade -v`

显示此版本 ZFS 支持的旧版 ZFS 版本。有关此版本 ZFS 所支持特性的说明，参见 zpool-features(7)。

### `zpool upgrade [-V version] -a | pool …`

在给定池上启用所有受支持的特性。

如果池通过 `-o compatibility` 属性指定了兼容性特性集，则只有所有请求的兼容性集中都存在的特性才会被启用。如果此属性设为 `legacy`，则不会执行升级。

一旦完成升级，该池将无法在不支持特性标志的系统上访问。有关与那些支持特性标志、但不支持该池已启用的全部特性的系统之间的兼容性详情，参见 zpool-features(7)。

#### `-a`

在所有池上启用所有受支持的特性（如有指定的兼容性集，则来自这些兼容性集）。

#### `-V version`

升级到指定的旧版本。如果指定此选项，则不会在池上启用任何特性。此选项只能用于把版本号提升到最后一个受支持的旧版本号。

## 示例

### 示例 1：将所有 ZFS 存储池升级到当前版本

以下命令把所有 ZFS 存储池升级到软件的当前版本：

```sh
# zpool upgrade -a
This system is currently running ZFS version 2.
```

## 参考文献

zpool-features(7)、zpoolconcepts(7)、zpoolprops(7)、zpool-history(8)

2022 年 7 月 11 日


---

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