如何在 Vista 中查看 NTFS 分区的分配单元大小?

我可以使用哪个内置的(如果有的话)工具来确定某个 NTFS 分区的分配单元大小?

323616 次浏览

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.

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.

from the commandline:

chkdsk l: (wait for the scan to finish)

sizdir32 http://www.ltr-data.se/opencode.html/

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:

start > run > MSINFO32

goto components

goto storage

goto disk

on the right look for Bytes/Sector

Another way to find it quickly via the GUI on any windows system:

  1. create a text file, type a word or two (or random text) in it, and save it.

  2. Right-click on the file to show Properties.

  3. "Size on disk" = allocation unit.

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 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

The simple GUI way, as provided by J Y in a previous answer:

  1. Create a small file (not empty)
  2. Right-click, choose Properties
  3. 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.

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

Easiest way, confirmed on 2012r2.

  1. Go to "This PC"
  2. Right click on the Disk
  3. Click on Format

Under drop down "allocation unit size" will be the value of what the Allocation of the Unit size disk already is.

In a CMD (as adminstrator), first run diskpart. In the opened program, enter list disk. It'll list all connected disks. list disk

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. list partition

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. Allocation Unit Size

Note: This procedure works on both NTFS and FAT32.