Check Disk Drive Allocation Unit Size

For SQL Server, the allocation unit size for the drives storing your data files is very important. This script will output the allocation size for each drive on your server.

Note: PowerShell needs to be launched as Administrator for FSUTIL to work.

The “Bytes Per Cluster” should show as 65536 for any drives with SQL Server data / log files on, except for the OS drive.

$disks = gwmi win32_logicaldisk -Filter "DriveType='3'"
ForEach($Disk In $Disks)
    {
       "$($Disk.DeviceID) $(fsutil fsinfo ntfsinfo $Disk.DeviceID | findstr /c:"Bytes Per Cluster")"
    }

The top example shows incorrect allocation unit size for the D and E drives where the SQL Data is being stored.
Underneath is correct after the drives have been reformatted.

Leave a Reply

Your email address will not be published. Required fields are marked *