Which built in (if any) tool can I use to determine the allocation unit size of a certain NTFS partition ?
12 Answers
Open an administrator command prompt, and do this command:
fsutil fsinfo ntfsinfo [your drive]
The Bytes Per Cluster is the equivalent of the allocation unit.
-
hand command but I think that just gives bytes per sector of your drive rather than the actual allocation unit? May 25, 2012 at 9:59
-
As far as I can tell, "Bytes Per FileRecord Segment" is what you can specify as the "Allocation unit size" in the Format dialog. Oct 19, 2012 at 2:30
-
4@KirillOsenkov: Nope, William is correct, it's "Bytes Per Cluster". I just formatted a drive and checked. Jun 9, 2014 at 12:45
-
6You have to have Administrator privilege to execute the command Jun 30, 2015 at 15:23
-
5This is great but doesn't work for removable drives: "The FSUTIL utility requires a local NTFS volume."– GaiaDec 14, 2016 at 23:26
Use diskpart.exe
.
Once you are in diskpart select volume <VolumeNumber>
then type filesystems
.
It should tell you the file system type and the allocation unit size. It will also tell you the supported sizes etc. Previously mentioned fsutil
does work, but answer isn't as clear and I couldn't find a syntax to get the same information for a junction point.
-
3Great answer! Since this method doesn't require NTFS volume and can be other types. +1 May 19, 2017 at 14:27
-
-
It does work with USB flash drives. I use this method almost exclusively for portable storage devices. I just used it today to get the allocation unit size of my 15 years old (year 2006 model) 2 GB SanDisk Cruzer Titanium USB flash drive, using Windows 10 build 21390.2025 (Dev channel Insider build). This has worked with USB flash drives at least since the age of Windows XP.– SamirJul 24, 2021 at 13:12
I know this is an old thread, but there's a newer way then having to use fsutil or diskpart.
Run this powershell command.
Get-Volume | Format-List AllocationUnitSize, FileSystemLabel
-
1
-
1For Windows 10 users that come across here, in powershell:
Get-Disk | Format-List
May 29, 2019 at 14:30 -
this came up today for me in a forensics class when discussing how to figure out cluster size on a drive.. people where trying the 'make small file and look at properties' method described on one answer, and that no longer works on modern versions of windows. Jun 13, 2020 at 21:56
-
@ChuckvanderLinden it still works, you just have to write plenty more data. NTFS now stores content up to 1KB right next to the file record in the attribution table thus, on disk, there is nothing to store. If you do exceed 1KB you'll see that the size on disk will probably jump to 4096 bytes (or whatever your unit size is).– FrankieOct 25, 2022 at 19:57
Another way to find it quickly via the GUI on any windows system:
create a text file, type a word or two (or random text) in it, and save it.
Right-click on the file to show Properties.
"Size on disk" = allocation unit.
-
5Probably obvious to most people but the "random text" needs to be smaller than your cluster size, ie don't put in a few KB of random text. For the moment a single character should be fine. Mar 9, 2015 at 11:47
-
3I tried this, but it shows size on disk = 0 bytes, while size = 15 bytes (i.e. the number of characters i wrote). : \– KeyC0deFeb 6, 2016 at 20:56
-
2This doesn't work on Windows Server 2012 R2. Size is shown as 9 bytes, Size on disk 0 bytes Oct 7, 2016 at 20:07
-
15@BorisHurinek, this is because answer is catastrophically invalid. NTFS stores tiny files directly into MFT's FileRecord.trailer. Mar 6, 2017 at 3:28
-
1
The value for BYTES PER CLUSTER - 65536 = 64K
C:\temp>fsutil fsinfo drives
Drives: C:\ D:\ E:\ F:\ G:\ I:\ J:\ N:\ O:\ P:\ S:\
C:\temp>fsutil fsinfo ntfsInfo N:
NTFS Volume Serial Number : 0xfe5a90935a9049f3
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x00000002e15befff
Total Clusters : 0x000000005c2b7dff
Free Clusters : 0x000000005c2a15f0
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
Bytes Per Physical Sector : 512
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 : 560F51B2-CEFA-11E5-80C9-98BE94F91273
C:\temp>fsutil fsinfo ntfsInfo N:
NTFS Volume Serial Number : 0x36acd4b1acd46d3d
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x00000002e15befff
Total Clusters : 0x0000000005c2b7df
Free Clusters : 0x0000000005c2ac28
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
Bytes Per Physical Sector : 512
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 : 560F51C3-CEFA-11E5-80C9-98BE94F91273
-
1My favorite though this assumes a drive letter is assigned and won't work for "drives" if mounted with a path. As a workaround, of course a drive letter can be assigned temporarily.– rainabbaDec 17, 2016 at 19:31
Easiest way, confirmed on 2012r2.
- Go to "This PC"
- Right click on the Disk
- Click on Format
Under drop down "allocation unit size" will be the value of what the Allocation of the Unit size disk already is.
-
Not working on my Win 10 Pro v2004... Just says "Default" for all drives.– n00dlesAug 6, 2020 at 19:34
-
2Wow, this is a good answer that shows this info,
Get-Disk | Format-List
does not show this info, butGet-Volume | Format-List
does. It's interesting because, you would think that Allocation Unit would correlate with Blocksize onGet-Disk | Format-List
but it does not. The Allocation Unit is why your files are larger on disk than the actual data they represent. Mar 24, 2021 at 17:52
In a CMD
(as adminstrator), first run diskpart
. In the opened program, enter list disk
. It'll list all connected disks.
Select the right disk based on its size. If it is flash memory, usually it'd be the last item in the list. In my case, I select the Disk 2
using this command: select disk 2
.
After selecting your disk, list the partitions using list partion
command. You'll get a list like the one in the image below.
Now, it is time to select the right partition, based on its size. In my case, I select Partition 1 using this command: select partition 1
.
Finally, you can run the filesystem
command to get the Allocation Unit Size
.
Note: This procedure works on both NTFS and FAT32.
According to Microsoft, the allocation unit size "Specifies the cluster size for the file system" - so it is the value shown for "Bytes Per Cluster" as shown in:
fsutil fsinfo ntfsinfo C:
You can use SysInternals NTFSInfo by Mark Russinovich from the command line and it converts fsutil fsinfo ntfsinfo into more readable information, especially MFT Table info.
The simple GUI way, as provided by J Y in a previous answer:
- Create a small file (not empty)
- Right-click, choose Properties
- Check "Size on disk" (in tab General), double-check that your file size is less than half that so that it is certainly using a single allocation unit.
This works well and reminds you of the significance of allocation unit size. But it does have a caveat: as seen in comments to previous answer, Windows will sometimes show "Size on disk" as 0 for a very small file. In my testing, NTFS filesystems with allocation unit size 4096 bytes required the file to be 800 bytes to consistently avoid this issue. On FAT32 file systems this issue seems nonexistent, even a single byte file will work - just not empty.
from the commandline:
chkdsk l: (wait for the scan to finish)
start > run > MSINFO32
goto components
goto storage
goto disk
on the right look for Bytes/Sector
-
3This is a property of your disk and not the allocation size of a specific partition on that disk. Mar 28, 2014 at 18:53
-
This will not show cluster size for filesystems, but rather sector size of underlying physical media. Mar 6, 2017 at 3:43