469 字
2 分钟
ReFS Usage Notes

What is ReFS#

When reading this article, it is assumed that you already understand the basic concepts of ReFS and its pros and cons. If not, refer to ReFS Overview. This article only discusses the notes for using ReFS on my own; for command parameters etc., please refer to the official docs linked in this article. Also, this article’s summary of ReFS is not exhaustive — please consult the official documentation.

ReFS notes#

The following only discusses using it as a data drive; it’s not recommended as a system drive. Although newer versions of Windows support booting from ReFS, the community has still found issues with basic problems like system restore.

WARNING

It is strongly recommended to disable automatic ReFS version upgrades before use. Otherwise, when rolling back a Windows version, you won’t be able to access the data drive — it becomes a RAW partition. ReFS version upgrades are irreversible; once upgraded, you cannot downgrade!!!

Daily maintenance#

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"RefsDisableLastAccessUpdate"=dword:00000001
;"RefsDisableVolumeUpgrade"=dword:00000001 不用这种方法,似乎会阻止手动升级

When you are sure you don’t need to downgrade, upgrade the ReFS version manually. Newer ReFS versions offer better performance and stability.

Terminal window
# 查看版本
fsutil fsinfo refsinfo z:
# 升级文件系统版本
fsutil Volume Upgrade <C:>

This one is quite useful. Data compression documentation

Data deduplication documentation

Data repair (a must-read)#

Analyzing and repairing file system corruption Performing recovery on a RAW (corrupted volume) to retrieve data.

Advanced features#

Integrity streams are a ReFS feature that ensures the integrity of file data. It uses CRC32 checksums to verify the integrity of file data. Once integrity streams are enabled, ReFS computes a CRC32 checksum every time a file is read and compares it with the checksum stored in the file. If the checksums don’t match, ReFS attempts to repair the file. Integrity streams documentation

Get-FileIntegrity#

To check whether integrity streams are enabled for file data, use the Get-FileIntegrity cmdlet.

Terminal window
Get-FileIntegrity -FileName 'C:\Docs\TextDocument.txt'
Terminal window
Get-Item -Path 'C:\Docs\*' | Get-FileIntegrity

You can also use the Get-Item cmdlet to obtain the integrity stream settings of all files in a specified directory.

Set-FileIntegrity#

To enable/disable integrity streams for file data, use the Set-FileIntegrity cmdlet.

Terminal window
Set-FileIntegrity -FileName 'H:\Docs\TextDocument.txt' -Enable $True

You can also use the Get-Item cmdlet to set the integrity stream settings of all files in a specified folder.

Terminal window
Get-Item -Path 'H\Docs\*' | Set-FileIntegrity -Enable $True

The Set-FileIntegrity cmdlet can also be used directly on volumes and directories.

Terminal window
Set-FileIntegrity H:\ -Enable $True
Set-FileIntegrity H:\Docs -Enable $True

Advanced data deduplication#

Advanced data deduplication commands I could never tell the difference between ReFSDedupSchedule and ReFSDedupScrubSchedule. In any case, I’ve always used ReFSDedupScrubSchedule.

But basically these are the ones commonly used

Terminal window
Disable-ReFSDedup Z:
refsutil dedup z: /d
Enable-ReFSDedup -Volume "Z:" -Type DedupAndCompress
Set-ReFSDedupScrubSchedule -Volume: Z: -Start 2025/4/29 19:0:0 -WeeksInterval 2
Start-ReFSDedupJob -Volume Z: -CompressionFormat LZ4
Stop-ReFSDedupJob Z:
ReFS Usage Notes
https://tski.uk/blog/en/refs-attention/
作者
Tokisaki Galaxy
发布于
2025-04-21
许可协议
CC BY