# ReFS

**ReFS**（Resilient File System，弹性文件系统）是微软为 [Windows Server](https://www.edgepedia.org/zh/windows-server) 开发的文件系统，于 2012 年 1 月随 Windows Server 8 推出。它从一开始就被定位为 NTFS 的补充而非替代品；自 2023 年起，[Windows 11](https://www.edgepedia.org/zh/windows-11) 客户端版本还搭载了一个经过调校的变体，称为 Dev Drive。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup><sup> • </sup><sup>[2](https://arstechnica.com/information-technology/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8/)</sup><sup> • </sup><sup>[3](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)</sup>

| 关键事实 | 详情 |
|---|---|
| 最大文件与卷大小 | ReFS 上为 35 PB（拍字节），而 NTFS 上为 256 TB<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> |
| 校验和 | 元数据始终受校验和保护；文件数据校验和（完整性流）为可选功能，默认关闭<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup><sup> • </sup><sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> |
| 自修复 | 自动修复需要镜像或奇偶校验存储空间；在简单空间或裸盘上，ReFS 会返回错误而非损坏的数据<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> |
| 清理器 | 后台扫描默认每四周运行一次，可在任务计划程序中配置<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> |
| ReFS 独有功能 | 块克隆、稀疏 VDL、镜像加速奇偶校验、文件级快照<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> |
| NTFS 独有功能 | 事务、对象 ID、ODX、磁盘配额、可引导性、收缩<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> |
| Dev Drive 构建增益 | 微软实测在 Dev Drive 上完整构建比 NTFS 快 14%，配合写时复制构建包时总计快 28%<sup>[3](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)</sup> |

## 设计与完整性模型

ReFS 通过校验和检测损坏。每个卷上的元数据都受校验和保护；仅当为某个文件、目录或整个卷启用了完整性流功能时，文件数据才受校验和保护，该设置可随时切换，并从父目录继承。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup><sup> • </sup><sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> 在 2012 年 1 月的发布公告中，校验和被描述为一个 64 位数字，用于保护元数据并可选地保护用户数据。<sup>[2](https://arstechnica.com/information-technology/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8/)</sup> 独立的取证研究证实，文件数据的完整性流默认并未启用，这限制了开箱即用的数据完整性保护。<sup>[5](https://www.sciencedirect.com/science/article/pii/S1742287619301252)</sup>

**读取时验证。** 启用完整性流后，ReFS 在返回数据之前会计算校验和，并与存储的校验和进行比对。在非弹性的简单空间或裸盘上，ReFS 会向用户返回错误，而不返回损坏的数据。在镜像或奇偶校验空间上，ReFS 会尝试修复数据；如果成功，它会执行纠正性写入以恢复数据的完整性，并将有效数据透明地返回给应用程序。<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup>

**清理。** 后台清理器定期扫描卷，识别潜在损坏并主动触发对损坏数据的修复。默认情况下每四周运行一次，该间隔可在任务计划程序的 Microsoft\Windows\Data Integrity Scan 下配置，ReFS 会将所有损坏记录到系统事件日志中。<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> 2012 年的发布描述与此设计一致：清理会定期读取卷中的所有数据和元数据，验证校验和，并在必要时使用镜像副本修复损坏的数据。<sup>[2](https://arstechnica.com/information-technology/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8/)</sup>

**磁盘结构与写入行为。** 对 ReFS 的取证分析表明，内容数据存储在簇中（例如 4 KiB），用于组织数据的元数据存储在 1 至 4 个簇的页中，[写时复制](https://www.edgepedia.org/zh/copy-on-write)机制以页为粒度运作；文件系统的表以 B+ 树实现。<sup>[6](https://dfrws.org/wp-content/uploads/2020/05/DFRWS-EU-2020-Forensic-Analysis-of-the-Resilient-File-System-ReFS-Version-3.4.pdf)</sup> 启用完整性流会改变写入路径：所有写操作都变为写时分配操作，这可能导致文件数据碎片化并延迟读取，校验和计算还可能增加 IO 延迟。微软建议在对性能敏感的系统上保持完整性流禁用。<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup>

## 功能与限制

ReFS 支持若干 NTFS 不支持的功能：块克隆、稀疏 VDL、镜像加速奇偶校验和文件级快照。NTFS 则支持事务、对象 ID、ODX、磁盘配额、可引导性和收缩，而 ReFS 均不支持这些功能。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> 在发布时，ReFS 还缺少单文件加密、单文件压缩、命名数据流、存储配额和事务性更新，且没有从 NTFS 到 ReFS 的转换路径；当时的报道认为，在这些缺口填补之前，它无法作为 NTFS 的完整替代品。<sup>[2](https://arstechnica.com/information-technology/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8/)</sup>

**备用数据流。** ReFS 最初未实现备用数据流支持。在 [Windows 8.1](https://www.edgepedia.org/zh/windows-8-1) 64 位和 Server 2012 R2 中，该文件系统重新获得了对备用数据流的支持，长度上限为 128K。随后出现了一次版本跳跃：ReFS v3.2 在 Windows Server 版本 1709 中首次亮相。<sup>[7](https://www.ntfs.com/refs-features.htm)</sup>

**块克隆。** 写时复制链接在 [Windows API](https://www.edgepedia.org/zh/windows-api) 中称为块克隆，它通过创建对原始磁盘数据的元数据引用并在写入时惰性复制，避免完整复制文件。CoW 链接在 Windows 上仅在 ReFS 中可用；在 iOS 和 Linux 中也可用。<sup>[3](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)</sup>

**稀疏 VDL。** 稀疏有效数据长度允许 ReFS 快速将文件清零，将创建固定 VHD 所需的时间从数十分钟缩短到仅几秒钟，这对 Hyper-V 虚拟化工作负载意义重大。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

## ReFS 与存储空间

ReFS 的自修复依赖于[存储空间](https://www.edgepedia.org/zh/storage-spaces)。当它与镜像或奇偶校验存储空间配合使用时，检测到的损坏会从备用副本自动修复，修复局限于损坏区域并在线执行，无需卷停机。如果卷发生损坏且不存在数据的备用副本，ReFS 会将损坏数据从命名空间中移除，通常保持卷在线；随后可以删除受影响的文件而无需使整个卷离线，并从备份恢复。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup><sup> • </sup><sup>[7](https://www.ntfs.com/refs-features.htm)</sup> 这就是 ReFS 弹性的实际边界：在没有存储空间的单磁盘卷上，校验失败的数据会产生错误，而非修复。<sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup>

对于 Windows Server 部署，镜像加速奇偶校验仅在存储空间直通上受支持，微软建议仅将其用于归档和备份工作负载；对于高性能随机工作负载，建议使用三向镜像。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

## 数字一览

微软的文档列出 ReFS 上的最大文件大小和卷大小为 35 PB，而 NTFS 为 256 TB。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> 分析师的表格给出了不同的理论上限：最大单文件大小为 16 EB，即 \( 2^{64} \) 字节减一字节，每个目录 2<sup>64</sup> 个文件，而 NTFS 为 2<sup>32</sup> − 1，每个卷的文件数无限制，而 NTFS 为 4,294,967,295。<sup>[8](https://www.directionsonmicrosoft.com/charts-illustrations/comparing-ntfs-and-refs-capabilities/)</sup>

簇大小为 4K 和 64K，大多数部署建议使用 4K，64K 适合大型顺序 IO 工作负载。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> 取证文献记录，ReFS v1.2 的默认簇大小为 64 KiB，这有助于通过文件雕刻恢复已删除文件，因为大多数已删除文件小于 64 KiB 并占据单个簇。<sup>[5](https://www.sciencedirect.com/science/article/pii/S1742287619301252)</sup> ReFS 和 NTFS 的最大文件名和路径长度相同：分别为 255 和 32K 个 Unicode 字符。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

## 与 NTFS 的比较

这两个文件系统划分了 Windows 存储工作负载。ReFS 提供块克隆、稀疏 VDL、镜像加速奇偶校验和文件级快照；NTFS 提供事务、对象 ID、ODX、磁盘配额、可引导性和收缩。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup> 由于 ReFS 内置弹性，管理员无需定期运行 CHKDSK 等错误检查工具，损坏的文件可以在不使卷离线的情况下删除，然后从备份恢复。<sup>[7](https://www.ntfs.com/refs-features.htm)</sup> 在规模上，ReFS 支持的 35 PB 最大值使 NTFS 的 256 TB 相形见绌。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

在性能方面，微软内部的 One Engineering System 团队实测，将一个 500 多个项目的 C# 代码库从 Windows 11 22H2 上的 NTFS 迁移到 Dev Drive 后，完整构建快了 14%；配合利用块克隆的 Microsoft.Build.CopyOnWrite 包，又提升了 14 个百分点，总计快 28%。<sup>[3](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)</sup>

## 近期发展

在 Microsoft Build 2023 上，Windows 团队宣布了 Dev Drive，这是 ReFS 的新演进，针对 Git 和构建等开发者工作负载进行了调校，随 Windows 11 23H2 更新发布。Dev Drive 是 ReFS 的一种特殊“受信任”模式。<sup>[3](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)</sup> 部分 ReFS 功能仍仅在 Windows Server 2025 上可用。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

**客户端可用性扩大。** Windows 11 Insider Build 27823 增加了创建 ReFS 分区并在新格式化的 ReFS 分区上执行全新安装的选项，在客户端系统上解锁了高达 35 PB 的卷。<sup>[9](https://www.tomshardware.com/software/windows/new-advanced-filesystem-format-option-found-in-windows-11-preview-build-refs-supports-up-to-35-petabytes)</sup>

**可靠性报告。** 一份 Windows 11 24H2 上的社区数据损坏测试日志记录：在带存储空间的 ReFS 卷上启用 ReFS 完整性流后，随后收到“数据完整性校验和错误……文件流中的数据已损坏”的错误，日期为 2025 年 1 月 9 日。<sup>[10](https://github.com/Borgquite/Test-ReFSDataCorruption/blob/main/Windows1124H2.txt)</sup>

## ReFS 在何处丢失数据

有记录的故障模式范围狭窄但真实存在。ReFS 仅在镜像或奇偶校验存储空间上存在备用副本时才修复损坏。如果没有备用副本，在简单空间或裸盘上，校验和失败会向应用程序产生错误而非静默损坏；如果卷发生损坏且没有备用副本，ReFS 会将损坏数据从命名空间中移除，同时保持卷在线。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup><sup> • </sup><sup>[4](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)</sup> 此时恢复便依赖于备份。

## 未解决的缺口

有记录的功能集中仍存在若干长期缺口：不支持引导、不支持磁盘配额、不支持收缩，而这些 NTFS 均保留。<sup>[1](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)</sup>

## References

1. [Resilient File System (ReFS) overview, Microsoft Learn](https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-overview)
2. [Microsoft introduces new robust "Resilient File System" for Windows Server 8, Ars Technica](https://arstechnica.com/information-technology/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8/)
3. [Dev Drive and Copy-on-Write for Developer Performance, Engineering@Microsoft](https://devblogs.microsoft.com/engineering-at-microsoft/dev-drive-and-copy-on-write-for-developer-performance/)
4. [ReFS integrity streams, Microsoft Learn](https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams)
5. [Reverse engineering of ReFS, Forensic Science International: Digital Investigation (DFRWS)](https://www.sciencedirect.com/science/article/pii/S1742287619301252)
6. [Forensic Analysis of the Resilient File System (ReFS) Version 3.4, DFRWS EU 2020](https://dfrws.org/wp-content/uploads/2020/05/DFRWS-EU-2020-Forensic-Analysis-of-the-Resilient-File-System-ReFS-Version-3.4.pdf)
7. [ReFS Features, NTFS.com](https://www.ntfs.com/refs-features.htm)
8. [Comparing NTFS and ReFS Capabilities, Directions on Microsoft](https://www.directionsonmicrosoft.com/charts-illustrations/comparing-ntfs-and-refs-capabilities/)
9. [New Windows file system option supports up to 35 petabyte volumes, Tom's Hardware](https://www.tomshardware.com/software/windows/new-advanced-filesystem-format-option-found-in-windows-11-preview-build-refs-supports-up-to-35-petabytes)
10. [Windows1124H2.txt, Test-ReFSDataCorruption incident log, GitHub](https://github.com/Borgquite/Test-ReFSDataCorruption/blob/main/Windows1124H2.txt)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Operating systems › File systems

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/refs

English original: https://www.edgepedia.org/refs
