How to Configure Windows Server 2019 ReFS File System
Resilient File System (ReFS) is Microsoft’s modern file system designed for maximum reliability, scalability, and data integrity. ReFS uses checksumming for all data and metadata, enabling automatic corruption detection and, when paired with Storage Spaces Mirror resiliency, automatic corruption repair. Windows Server 2019 includes ReFS version 3.4 with improved performance and compatibility. ReFS is particularly well-suited for workloads involving large files, virtual machine storage, and backup repositories.
ReFS vs NTFS — When to Use Each
ReFS offers several advantages over NTFS for appropriate workloads. ReFS provides automatic data integrity checking via checksums on all data blocks, support for volumes up to 1 yottabyte, and file sizes up to 16 exabytes. The block cloning feature in ReFS enables near-instant VM checkpoint creation in Hyper-V. ReFS also has faster write performance for large sequential I/O workloads.
ReFS limitations include no support for file compression, encryption (EFS), disk quotas, or short 8.3 filenames. ReFS also cannot be used as a boot volume. For volumes requiring these features, NTFS remains the correct choice. ReFS is ideal for Hyper-V VM storage, Scale-Out File Server shares, and backup repositories.
Creating a ReFS Volume on Windows Server 2019
# Format a new volume with ReFS using PowerShell
# First create a partition (disk 2 in this example)
Initialize-Disk -Number 2 -PartitionStyle GPT
$partition = New-Partition -DiskNumber 2 -UseMaximumSize -AssignDriveLetter
# Format as ReFS with 64KB allocation unit (optimal for VM workloads)
Format-Volume -Partition $partition `
-FileSystem ReFS `
-NewFileSystemLabel "VMStorage" `
-AllocationUnitSize 65536 `
-Confirm:$false
# Verify the file system
Get-Volume -DriveLetter $partition.DriveLetter |
Select-Object DriveLetter, FileSystem, FileSystemLabel, Size, SizeRemaining
Using Diskpart to Format ReFS
diskpart
DISKPART> select disk 2
DISKPART> clean
DISKPART> convert gpt
DISKPART> create partition primary
DISKPART> format fs=refs label="VMStorage" quick unit=65536
DISKPART> assign letter=V
DISKPART> exit
Enabling ReFS Integrity Streams
Integrity streams ensure ReFS checksums are applied to all data. They are enabled by default on ReFS volumes created in Storage Spaces. To verify and manage integrity streams:
# Check if integrity streams are enabled on a ReFS volume
Get-Item -Path V: | Get-FileIntegrity
# Enable integrity streams on the entire volume
Set-FileIntegrity -FileName V: -Enable $true
# Check integrity of a specific file
Get-FileIntegrity -FileName "V:VMsVM01VM01.vhdx"
# Disable integrity streams for a specific directory (e.g., for performance-sensitive workloads)
Set-FileIntegrity -FileName "V:HighIOPS" -Enable $false
# Repair a file with integrity violations (requires mirrored Storage Spaces)
Repair-FileIntegrity -FileName "V:VMsVM01VM01.vhdx"
Using Block Cloning for Hyper-V Checkpoints
ReFS block cloning allows Hyper-V to create VM checkpoints almost instantly by referencing existing blocks rather than copying data. This is automatically used when the VM storage is on a ReFS volume. Verify that block cloning is in use:
# Check ReFS version (block cloning requires ReFS v3.1+)
fsutil fsinfo refsinfo V:
# Expected output includes:
# File System Type : ReFS
# Serial Number : 0x...
# Refs Version : 3.4
# Configure Hyper-V to store VMs on the ReFS volume
New-VMSwitch -Name "InternalSwitch" -SwitchType Internal
# Create a VM on ReFS storage
New-VM -Name "TestVM" `
-Path "V:VMs" `
-MemoryStartupBytes 4GB `
-Generation 2
# Create a checkpoint - should be near-instant on ReFS
Checkpoint-VM -Name "TestVM" -SnapshotName "PrePatch-Checkpoint"
ReFS with Storage Spaces for Automatic Repair
# Create a Storage Spaces Mirror pool for automatic ReFS repair
$disks = Get-PhysicalDisk -CanPool $true | Select-Object -First 4
New-StoragePool -FriendlyName "ReFS-MirrorPool" `
-StorageSubSystemFriendlyName (Get-StorageSubSystem).FriendlyName `
-PhysicalDisks $disks
New-VirtualDisk -StoragePoolFriendlyName "ReFS-MirrorPool" `
-FriendlyName "ReFS-VMStorage" `
-Size 2TB `
-ResiliencySettingName Mirror `
-NumberOfDataCopies 2
$vdisk = Get-VirtualDisk -FriendlyName "ReFS-VMStorage"
$disk = $vdisk | Get-Disk
Initialize-Disk -Number $disk.Number -PartitionStyle GPT
New-Partition -DiskNumber $disk.Number -UseMaximumSize -AssignDriveLetter |
Format-Volume -FileSystem ReFS -NewFileSystemLabel "ReFS-VMVol" -AllocationUnitSize 65536
Monitoring ReFS Volume Health
# Run integrity scan on ReFS volume
# Schedule this to run during maintenance windows
$job = Start-Job -ScriptBlock {
fsutil repair enumerate V: scrub 2>&1
}
# Check volume for corruption
Repair-Volume -DriveLetter V -Scan
# If errors found:
Repair-Volume -DriveLetter V -OfflineScanAndFix
# View ReFS-specific counters in Performance Monitor
Get-Counter -Counter "ReFS(*)*" |
Select-Object -ExpandProperty CounterSamples |
Where-Object { $_.CookedValue -gt 0 } |
Select-Object Path, CookedValue | Format-Table -AutoSize
ReFS Deduplication Support
# Data deduplication is supported on ReFS in Windows Server 2019
# Install the deduplication feature
Install-WindowsFeature -Name FS-Data-Deduplication
# Enable deduplication on ReFS volume in Backup mode
Enable-DedupVolume -Volume "V:" -UsageType Backup
# Check dedup status
Get-DedupVolume -Volume "V:" | Select-Object Volume, Enabled, UsageType, SavedSpace
ReFS is the recommended file system for Hyper-V virtual machine storage on Windows Server 2019, particularly when using Storage Spaces with mirror resiliency. The combination of ReFS integrity streams, block cloning, and Storage Spaces scrubbing provides the highest level of data protection available in Windows Server’s native storage stack. Plan your storage architecture to use ReFS for all new VM and backup workloads going forward.