How to Set Up SMB Transparent Failover on Windows Server 2012 R2
SMB Transparent Failover is a feature of SMB 3.0 in Windows Server 2012 R2 that allows SMB clients to reconnect to a file server without interruption or visible error when a cluster node hosting a file share fails or is taken offline for maintenance. From the client perspective, the connection to the SMB share simply continues — open file handles are preserved and operations resume on the surviving cluster node without the application experiencing an error. This capability is critical for Hyper-V hosts storing virtual machine disks on SMB 3.0 file servers and for SQL Server instances using SMB file shares for data storage. Transparent Failover relies on the Scale-Out File Server (SoFS) cluster role and Continuously Available (CA) shares.
Prerequisites
SMB Transparent Failover requires Windows Server 2012 R2 with the Failover Clustering feature installed and a working Scale-Out File Server cluster role. A minimum of two cluster nodes is required. Cluster Shared Volumes (CSVs) must be configured for the SMB shares. The SMB client must support SMB 3.0 — this requires Windows 8, Windows 8.1, Windows 10, Windows Server 2012, or Windows Server 2012 R2. SMB Multichannel is strongly recommended alongside Transparent Failover for maximum availability and performance.
Understanding SMB Transparent Failover Architecture
Transparent Failover works through several coordinated mechanisms. SMB 3.0 Continuously Available (CA) shares maintain persistent file handles that survive server-side disruptions. When a cluster node fails, the cluster immediately transfers CSV ownership to a surviving node. The SMB client’s open handles are preserved — they are reconnected to the new owning node without generating I/O errors. The client transparently retries in-flight operations and resumes from where it left off. The entire process is designed to complete within the SMB client’s timeout window so applications do not detect a failure.
Step 1: Verify Scale-Out File Server Is Configured
Transparent Failover requires a Scale-Out File Server (SoFS) cluster role. Verify the SoFS is running:
Get-ClusterGroup | Where-Object {$_.GroupType -eq "ScaleOutFileServer"} | Select-Object Name, State
Get-SmbShare | Where-Object {$_.ContinuouslyAvailable -eq $true} | Select-Object Name, ScopeName, Path, ContinuouslyAvailable
If no Continuously Available shares exist, create one on the SoFS:
New-SmbShare -Name "CAShare" `
-ScopeName "SOFS01" `
-Path "C:ClusterStorageVolume1CAData" `
-FullAccess "Domain Admins" `
-ContinuouslyAvailable $true `
-CachingMode None
Step 2: Enable Continuously Available Shares
If you have existing SoFS shares that are not marked as Continuously Available, update them:
Set-SmbShare -Name "HyperVVMs" -ScopeName "SOFS01" -ContinuouslyAvailable $true
# Verify the setting
Get-SmbShare -Name "HyperVVMs" | Select-Object Name, ContinuouslyAvailable, CachingMode, ScopeName
Note: CachingMode must be None (offline files disabled) for Continuously Available shares. Enabling client-side caching conflicts with the CA share model.
Step 3: Verify SMB 3.0 Protocol on Clients
Confirm that Hyper-V host clients connecting to SoFS shares are using SMB 3.0:
# On the SoFS server, check active SMB sessions and their dialects
Get-SmbSession | Select-Object ClientComputerName, Dialect, NumOpens, TransportName
# Should show Dialect "3.00" or "3.02" for SMB 3.0 clients
From the client side:
Get-SmbConnection | Select-Object ServerName, ShareName, Dialect, NumOpens, SmbInstance
Step 4: Configure Witness Service for Transparent Failover
The SMB Witness service is a critical component of Transparent Failover. It runs on each cluster node and notifies SMB clients about cluster state changes — specifically which node currently owns a CSV. This notification allows clients to reconnect to the new owner immediately rather than waiting for a timeout:
# Verify Witness service is running on all cluster nodes
Get-Service cluswsvc -ComputerName "Node01", "Node02" | Select-Object MachineName, Status, Name
# Enable if not running
$nodes = @("Node01", "Node02")
$nodes | ForEach-Object {
Invoke-Command -ComputerName $_ -ScriptBlock {
Set-Service cluswsvc -StartupType Automatic
Start-Service cluswsvc
}
}
Verify the Witness endpoint is accessible:
Get-SmbWitnessClient | Select-Object ClientName, State, FileServerName
Step 5: Test Transparent Failover
The definitive test of Transparent Failover is verifying that operations continue without error during a node failure or planned maintenance. Set up a test scenario with a running Hyper-V VM stored on the SoFS share, then fail a node:
# Start a VM on the SoFS-backed storage
Start-VM -Name "TestVM01"
# Verify it's running
Get-VM -Name "TestVM01" | Select-Object Name, State, Status
While the VM is running, perform a planned node drain to simulate maintenance:
# Drain Node01 (live migrate VMs and move cluster roles)
Suspend-ClusterNode -Name "Node01" -Drain
# Monitor VM state during drain - should remain Running throughout
do {
$vmState = (Get-VM -Name "TestVM01").State
Write-Host "$(Get-Date -Format 'HH:mm:ss') - VM State: $vmState"
Start-Sleep -Seconds 2
} while ((Get-ClusterNode -Name "Node01").State -ne "Paused")
After the drain, the VM should still be running without interruption, and all SoFS-connected clients should be transparently redirected to the surviving nodes.
Step 6: Verify Transparent Failover with SMB Persistent Handles
Check that SMB clients are holding persistent handles on CA shares (persistent handles survive brief server outages):
Get-SmbOpenFile | Where-Object {$_.ShareName -eq "HyperVVMs"} | Select-Object ClientComputerName, Path, SessionId | Format-Table
Monitor the failover event logs on both server and client:
# On the SoFS server
Get-WinEvent -LogName "Microsoft-Windows-SMBServer/Operational" -MaxEvents 20 | Where-Object {$_.Id -in 1012,1013,1014} | Select-Object TimeCreated, Id, Message
# Check cluster events
Get-WinEvent -LogName "Microsoft-Windows-FailoverClustering/Operational" -MaxEvents 20 | Select-Object TimeCreated, Id, Message
Step 7: Resume the Node
After maintenance or testing, resume the paused cluster node:
Resume-ClusterNode -Name "Node01" -Failback NoFailback
# Verify Node01 is back online
Get-ClusterNode | Select-Object Name, State
# Allow VMs to optionally fail back
Get-VM | Where-Object {$_.State -eq "Running"} | Select-Object Name, Status
Summary
SMB Transparent Failover on Windows Server 2012 R2 delivers a genuinely zero-downtime file serving capability for SMB 3.0 workloads. By combining the Scale-Out File Server cluster role, Continuously Available shares, the SMB Witness service, and persistent file handles, clients experience uninterrupted access to file shares even when individual cluster nodes fail or undergo maintenance. This is a cornerstone technology for highly available Hyper-V and SQL Server deployments that use SMB 3.0 as their storage fabric.