> 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/fsck.zfs.8.md).

# fsck.zfs(8)

## 名称

`fsck.zfs` — 占位用 ZFS 文件系统检查器

## 概述

```sh
fsck.zfs [选项] 数据集…
```

## 说明

`fsck.zfs` 是一个轻量的 shell 包装器，至多检查数据集所在池的状态。OpenZFS 之所以安装它，是因为某些 Linux 发行版要求所有文件系统都提供配套的 fsck 辅助程序。

如果指定了多个数据集，将依次逐一检查，并把结果按位或合并。

## 选项

所有选项均被忽略。

## 注意

检查 ZFS 数据集的方法是在其所在的池上运行 `zpool scrub`。单个 ZFS 数据集永远不会脱离其所在的池被独立检查，这一点与常规文件系统不同。

不过，fsck(8) 接口仍然允许它传达一些错误信息：如果数据集位于降级的池中，`fsck.zfs` 将返回退出码 `4`，表示存在未修正的文件系统错误。

类似地，如果数据集位于故障池中，并且在 `/etc/fstab` 中有一条旧式记录，`fsck.zfs` 将返回退出码 `8`，表示发生了致命的操作错误。

## 参考文献

fstab(5)、fsck(8)、zpool-scrub(8)

2021 年 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/fsck.zfs.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.
