2

The Resilient File System (ReFS) introduced block cloning, see https://learn.microsoft.com/en-us/windows-server/storage/refs/block-cloning.

Let's assume I've a 128 GB ReFS partition and I've a 8 GB file.

If I copy and paste (duplicate) that file in the Windows Explorer on the above ReFS partition it look's like block cloning is not used. When only one file was on the disk the free space was around 120 GB. With twice the same file the free space was around 112 GB.

I observed the same behavior if use copy or xcopy in the command line.

So how could I use the block cloning feature of ReFS from the command line?

fsutil fsinfo volumeinfo g: returns

Volume Name : Test
Volume Serial Number : 0x960ecc56
Max Component Length : 255
File System Name : ReFS
Is ReadWrite
Not Thinly-Provisioned
Supports Case-sensitive filenames
Preserves Case of filenames
Supports Unicode in filenames
Preserves & Enforces ACL's
Supports Sparse files
Supports Reparse Points
Returns Handle Close Result Information
Supports Named Streams
Supports Open By FileID
Supports USN Journal
Supports Integrity Streams
Supports Block Cloning
Supports Sparse VDL
Supports File Ghosting

The final goal is to use msbuild and block cloning, see https://stackoverflow.com/questions/74234924/create-symbolic-link-instead-of-coping-the-content-to-the-output-directory

1

1 Answer 1

2

Currently (May 2024) you need to use specific APIs to take advantage of the copy-on-write functionality in ReFS.

The canary builds of Windows 11 (version 25982 onwards) build this functionality into the Win32 libraries so that any copy command will automatically take advantage of it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .