Disk ‘Allocation Unit Size’ v2

I have been sloppy with my posts lately, and got a question how to fix the ‘Allocation Unit Size’ problemt if you are installing a SQL Server. My last post on this topic only described how to detect, but not fix the problem. To detect an invalid ‘Allocation Unit Size’ for a disk on a SQL Server (or other server for that matter), you use several methods:

My powershell function GetDiskAllocUnitSizeKB, described here.

DOS command: “fsutil fsinfo ntfsinfo <drive:>“. This command is shown in screenshot below with the specific field of interest in “Bytes Per Cluster“.


The same information can also be found by right-clicking on the disk in Windows Explorer and select “Format…”. There you have the current “Allocation Unit Size” as the same number retrieved from fsutil command.


If you want to reformat the disk with a different block size, you choose another value in the “Allocation Unit Size” combo-box and Quick format the disk (OBS! will erase the complete disk). You can also use the command-line to format the disk. For my case above, I should use the following command to format my E: drive with 64K block size.

format E: /FS:NTFS /V:DATA /Q /A:64K

Now, you have a disk partition with 64K block size suitable for large SQL Server files.

Please do not test these command on you local laptop – use a virtual machine 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s