> 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/di-25-zhang-ufs-wen-jian-xi-tong/di-25.1-jie-ufs-wen-jian-xi-tong-gai-shu.md).

# 25.1 UFS 文件系统概述

UFS（UNIX File System，全称 UNIX 文件系统）是 FreeBSD 的原生文件系统，基于伯克利快速文件系统（Berkeley Fast File System，FFS），由 Kirk McKusick、Bill Joy 等人于 1983 年随 4.2BSD 首次引入，当前版本为 UFS2。历史上，macOS 也曾使用该文件系统作为根文件系统。本章介绍磁盘添加、磁盘扩容、快照创建与挂载、配额管理以及磁盘加密五类操作。

需要区分本节所述的 UFS 文件系统与手机等设备中使用的 UFS 存储属于完全不同的技术范畴。后者全称为 Universal Flash Storage（通用闪存存储），是一种硬件存储标准，目前已发展至 5.0 版本（2026 年）。FreeBSD 自 7.x 起通过 mmc/mmcsd 驱动提供基本的 MMC/SD 支持，FreeBSD 10.4 实现了完整的 eMMC 支持（包括分区、TRIM 及 HS400 总线速度模式），FreeBSD 15.0 已通过 `ufshci` 驱动支持 UFS 存储。

作为文件系统的 UFS 当前版本号为 2。基于 Linux 的 Android 系统不支持 UFS 文件系统，此类设备的根文件系统通常为 ext4，部分新设备采用 F2FS，而 Linux 对 UFS 的读写支持尚不完整。

## 参考文献

* Jaeyoon Choi. Universal Flash Storage on FreeBSD\[EB/OL]. \[2026-04-16]. <https://freebsdfoundation.org/our-work/journal/browser-based-edition/freebsd-15-0/universal-flash-storage-on-freebsd/>. 该文介绍了 FreeBSD UFS 驱动的开发过程及当前状态。
* McKusick M K. 4.4BSD 操作系统设计与实现\[M]. 李善平,刘文峰,马天驰,译. 北京: 机械工业出版社, 2012. 该书第 7 章详细描述了 FFS 的设计与历史。
* McKusick M K, Joy W N, Leffler S J, et al. A Fast File System for UNIX\[J]. ACM Transactions on Computer Systems, 1984, 2(3): 181-197. FFS 原始论文，首次系统阐述了伯克利快速文件系统的设计与实现。


---

# 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/di-25-zhang-ufs-wen-jian-xi-tong/di-25.1-jie-ufs-wen-jian-xi-tong-gai-shu.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.
