How to Configure Windows Server 2016 ReFS File System
Resilient File System (ReFS) is a modern file system introduced by Microsoft to maximize data availability, scale efficiently with large data sets, and provide data integrity. Windows Server 2016 significantly enhanced ReFS with features such as integrity streams, block cloning, and sparse VDL, making it an excellent choice for storage spaces, virtualization workloads, and high-value data. This guide walks you through configuring ReFS on Windows Server 2016.
Understanding ReFS vs NTFS
Before configuring ReFS, it is important to understand the differences compared to NTFS. ReFS was designed to overcome the limitations of NTFS in large-scale environments. Key advantages of ReFS include automatic integrity checking and data scrubbing, resilience against data corruption, support for very large volumes and file sizes up to 35 petabytes, and improved performance with Storage Spaces. However, ReFS does not support all NTFS features such as file compression, disk quotas, and EFS encryption, so evaluate your requirements carefully before switching.
Prerequisites
Before you begin, ensure the following prerequisites are met. You need a server running Windows Server 2016 (Standard or Datacenter edition). Administrative privileges are required on the server. An unformatted disk or volume should be available for ReFS formatting. If using Storage Spaces, the storage pool should already be configured. Optionally, Windows PowerShell 5.1 or later is available for scripting the configuration.
Creating a ReFS Volume Using Disk Management
You can create a ReFS volume using the built-in Disk Management tool. Open Disk Management by right-clicking the Start button and selecting Disk Management. Locate the unallocated disk you want to use. Right-click on the unallocated space and select New Simple Volume. Follow the wizard, and when prompted to format the partition, select ReFS from the file system dropdown. Assign a drive letter and complete the wizard. The volume will be formatted with ReFS and be ready for use.
Creating a ReFS Volume Using PowerShell
PowerShell provides a more efficient and scriptable method to configure ReFS volumes. Use the following commands to initialize a new disk, create a partition, and format it with ReFS.
First, list available disks to identify the target disk number:
Get-Disk
Initialize the disk if it is in a RAW state:
Initialize-Disk -Number 1 -PartitionStyle GPT
Create a new partition using all available space:
New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter
Format the partition with ReFS and assign a volume label:
Format-Volume -DriveLetter E -FileSystem ReFS -NewFileSystemLabel "ReFS_Data" -Confirm:$false
Enabling ReFS Integrity Streams
Integrity streams allow ReFS to detect and potentially correct data corruption using checksums stored with each file. When used with Storage Spaces mirroring, ReFS can automatically repair corrupted data by using the mirror copy. Integrity streams are enabled by default on ReFS volumes created within Storage Spaces. To verify or configure integrity streams on an existing ReFS volume, use the following command:
Get-Item -Path "E:" | Get-FileIntegrity
To set integrity for all files on a volume:
Set-FileIntegrity -FileName "E:" -Enable $true
Configuring ReFS with Storage Spaces
ReFS achieves its full potential when used with Storage Spaces. To create a storage pool and a virtual disk with ReFS, start by identifying available physical disks:
Get-PhysicalDisk | Where-Object CanPool -eq $true
Create a new storage pool:
New-StoragePool -FriendlyName "ReFS_Pool" -StorageSubSystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
Create a virtual disk with a mirror layout for resilience:
New-VirtualDisk -StoragePoolFriendlyName "ReFS_Pool" -FriendlyName "ReFS_VDisk" -ResiliencySettingName Mirror -UseMaximumSize
Initialize, partition, and format with ReFS:
Get-VirtualDisk -FriendlyName "ReFS_VDisk" | Get-Disk | Initialize-Disk -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem ReFS -NewFileSystemLabel "ReFS_Mirror"
Using Block Cloning with ReFS
Block cloning is a ReFS feature that allows the file system to copy data regions without physically duplicating the data on disk, saving both time and storage. It is particularly useful for virtualization workloads where virtual machine checkpoints and cloning are frequent operations. Block cloning is leveraged automatically by Hyper-V in Windows Server 2016 when the virtual machine storage resides on a ReFS volume. No additional configuration is required to enable this feature.
Enabling Sparse VDL
Sparse Valid Data Length (VDL) is a ReFS feature that allows large files to be created almost instantaneously by not zeroing out the file contents immediately. This significantly speeds up virtual hard disk creation and is especially beneficial in VDI deployments. Sparse VDL is automatically available on ReFS volumes in Windows Server 2016 and utilized by Hyper-V. To test sparse VDL behavior, you can create a large file and observe the near-instant creation time compared to NTFS.
Running ReFS Data Scrubbing
Data scrubbing proactively reads all data on a ReFS volume and checks integrity, repairing any detected corruption. This is performed via Storage Spaces. To start a repair job on a storage pool containing ReFS volumes:
Get-StoragePool -FriendlyName "ReFS_Pool" | Start-StoragePoolRepair
To check the repair job status:
Get-StoragePool -FriendlyName "ReFS_Pool" | Get-StorageJob
Monitoring ReFS Volume Health
Monitor ReFS volumes regularly to ensure data integrity and performance. Use the following command to check the health status of a volume:
Get-Volume -DriveLetter E | Select-Object DriveLetter, FileSystem, HealthStatus, OperationalStatus, SizeRemaining, Size
Review the Windows Event Viewer under Applications and Services Logs > Microsoft > Windows > ReFS for any warnings or errors related to ReFS operations. Additionally, Storage Spaces health can be monitored with:
Get-StoragePool | Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus
Best Practices for ReFS
To get the most from ReFS on Windows Server 2016, follow these best practices. Use ReFS with Storage Spaces mirroring for maximum data protection and automatic repair capabilities. Place Hyper-V virtual machine storage on ReFS volumes to take advantage of block cloning and sparse VDL for faster VM operations. Schedule regular data scrubbing jobs to proactively detect and repair corruption. Monitor Event Viewer regularly for ReFS-related events. Avoid using ReFS for boot volumes, system volumes, or scenarios requiring NTFS-only features such as file-level encryption or disk quotas. Keep your Windows Server 2016 installation updated to receive the latest ReFS improvements and bug fixes from Microsoft.
By properly configuring and maintaining ReFS on Windows Server 2016, you gain a highly resilient and scalable file system that protects critical data and improves performance in demanding enterprise workloads.