Why is FAT32 limited to just under 2^28 clusters?

31

4

With FAT16 the maximum partition size is 2GB when your maximum cluster size is 32K.

This is calculated by multiplying the number of addressable units by the cluster size.

(216 Allocation units) * (215 bytes/cluster) = 2 GiB

However with FAT32, when I do the same calculation I get a much larger number than the 8 TiB maximum when using 232 clusters.

(232 Allocation units) * (cluster size)

If I use a cluster size of 512 bytes, I've already arrived at 2 TiB.

In an XP TechNet article, Microsoft says

The maximum possible number of clusters on a FAT32 volume is 268,435,445, and there is a maximum of 32 KB per cluster, along with the space required for the file allocation table (FAT).

This puts the maximum cluster size at 228 - 11.

Why is the maximum number of clusters in FAT32 228-11 and not 232, given that it was 216 in FAT16?

QMord

Posted 2015-10-06T20:26:49.390

Reputation: 666

Answers

49

FAT32 only uses 28 bits not 32. Four bits are "reserved for future use".

So, a FAT32 partition has a maximum cluster count of 268,435,455 (228-1)

Reference

Although VFAT was a clever system, it did not address the limitations of FAT16. As a result, a new file system (and not just better FAT management as was the case with VFAT) appeared with Windows 95 OSR2. This file system, called FAT32 uses 32-bit values for the FAT entries. In fact, only 28 bits are used, as 4 bits are reserved for future use.

With the appearance of the FAT32 file system, the maximum number of clusters per partition went increased from 65535 to 268,435,455 (228-1). FAT32 thus allows much bigger partitions (up to 8 terabytes). Although the maximum theoretical size of a FAT32 partition is 8 TB, Microsoft has voluntarily limited it to 32 GB on Windows 9x systems to promote NTFS

Josh

Posted 2015-10-06T20:26:49.390

Reputation: 4 746

3Excellent :D That's exactly what I was trying to find out. Also, googling FAT28 shows that though they were "reserved for future use," they were never actually used. – QMord – 2015-10-06T21:01:02.007

56That's the usual meaning of "future". – Russell Borogove – 2015-10-06T22:21:02.807

2@RussellBorogove, Even after 40 years? – Pacerier – 2015-10-07T08:21:04.347

12@Pacerier welcome to software. It is better to have wriggle room to mitigate any surprises! – Gusdor – 2015-10-07T09:11:46.940

5@Pacerier: FAT32 is only 20 years old... – Daniele Torino – 2015-10-07T11:26:47.930

@Pacerier What Daniele Torino wrote. FAT32 was introduced with Windows 95 OEM Service Release 2 which was released on August 24, 1996. FAT16 as we know it was originally introduced in late 1987.

– a CVn – 2015-10-07T14:20:56.777

@DanieleTorino, @​Michael, Looks like my comment will have to wait a while before it becomes valid again. ;) – Pacerier – 2015-10-19T13:01:19.983

The last statement in your quote is wrong, the artificial limit of 32GB is specific to NT based windows (and specific to the formatter at that). Windows 98 will partition and format larger drives as FAT32. – plugwash – 2018-06-13T20:17:55.960