PureStorage has a pretty cool post that mentions the importance of formatting SQL Server disks with a 64KB clusters and the /L flag (also known as the UseLargeFRS switch on PowerShell's Format-Volume cmdlet).
Why UseLargeFRS? It's to help avoid DBCC CHECKDB
failures on large/busy databases. But how do you work out whether it's enabled or not? PowerShell to the rescue!
You can't work this out remotely but you can do it locally.
Get-CimInstance Win32_Volume | ForEach-Object {
$fsutil = &fsutil fsinfo ntfsinfo $_.Name
$fsutil = $($fsutil -join ",$([Environment]::NewLine)" -replace '(.*?)\s*:\s*([^,]*)(,*)', '"$1" : "$2"$3')
$fsutil = ConvertFrom-Json "{ $fsutil }" | Add-Member -MemberType NoteProperty -Name Name -Value $_.Name -PassThru
if ($fsutil.'Bytes Per Cluster' -ne "65536") {
"Fail: $($_.Name) Bytes Per Cluster not formatted to 64K"
}
if ($fsutil.'Bytes Per FileRecord Segment' -ne 4096) {
"Fail: $($_.Name) Large FRS not enabled"
}
}
Some blog posts have said that you MUST use 64K clusters in order to UseLargeFRS to take effect, but I don't think this is true. I did some testing of formatting with different values to see what would come out.
# Default
Format-Volume D
&fsutil fsinfo ntfsinfo D:
NTFS Volume Serial Number : 0xca86beb886bea47b NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x000000000fdbefff Total Clusters : 0x0000000001fb7dff Free Clusters : 0x0000000001fb1250 Total Reserved : 0x0000000000000000 Bytes Per Sector : 512 Bytes Per Physical Sector : 4096 Bytes Per Cluster : 4096 Bytes Per FileRecord Segment : 1024 Clusters Per FileRecord Segment : 0 Mft Valid Data Length : 0x0000000000040000 Mft Start Lcn : 0x00000000000c0000 Mft2 Start Lcn : 0x0000000000000002 Mft Zone Start : 0x00000000000c0000 Mft Zone End : 0x00000000000cc820 Resource Manager Identifier : F81166FD-B030-11E7-80B8-00155D01C214
I've marked non-default changes in red.
# 64K clusters only
Format-Volume D -AllocationUnitSize 65536
&fsutil fsinfo ntfsinfo D:
NTFS Volume Serial Number : 0xf41aca091ac9c8b6 NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x000000000fdbefff Total Clusters : 0x00000000001fb7df Free Clusters : 0x00000000001fb15d Total Reserved : 0x0000000000000000 Bytes Per Sector : 512 Bytes Per Physical Sector : 4096 Bytes Per Cluster : 65536 Bytes Per FileRecord Segment : 1024 Clusters Per FileRecord Segment : 0 Mft Valid Data Length : 0x0000000000010000 Mft Start Lcn : 0x000000000000c000 Mft2 Start Lcn : 0x0000000000000001 Mft Zone Start : 0x000000000000c000 Mft Zone End : 0x000000000000cca0 Resource Manager Identifier : F81166CF-B030-11E7-80B8-00155D01C214
# 64K clusters and UseLargeFRS
Format-Volume D -AllocationUnitSize 65536 -UseLargeFRS
&fsutil fsinfo ntfsinfo D:
NTFS Volume Serial Number : 0x3694f89994f85cb5 NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x000000000fdbefff Total Clusters : 0x00000000001fb7df Free Clusters : 0x00000000001fb150 Total Reserved : 0x0000000000000000 Bytes Per Sector : 512 Bytes Per Physical Sector : 4096 Bytes Per Cluster : 65536 Bytes Per FileRecord Segment : 4096 Clusters Per FileRecord Segment : 0 Mft Valid Data Length : 0x0000000000100000 Mft Start Lcn : 0x000000000000c000 Mft2 Start Lcn : 0x0000000000000001 Mft Zone Start : 0x000000000000c000 Mft Zone End : 0x000000000000cca0 Resource Manager Identifier : F81166E1-B030-11E7-80B8-00155D01C214
# UseLargeFRS only
Format-Volume D -UseLargeFRS
&fsutil fsinfo ntfsinfo D:
NTFS Volume Serial Number : 0x42480af6480ae88d NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x000000000fdbefff Total Clusters : 0x0000000001fb7dff Free Clusters : 0x0000000001fb118f Total Reserved : 0x0000000000000000 Bytes Per Sector : 512 Bytes Per Physical Sector : 4096 Bytes Per Cluster : 4096 Bytes Per FileRecord Segment : 4096 Clusters Per FileRecord Segment : 1 Mft Valid Data Length : 0x0000000000100000 Mft Start Lcn : 0x00000000000c0000 Mft2 Start Lcn : 0x0000000000000002 Mft Zone Start : 0x00000000000c0000 Mft Zone End : 0x00000000000cc820 Resource Manager Identifier : F81166E7-B030-11E7-80B8-00155D01C214