0

How is the maximum cluster size determined? When Windows provides the option to select an "Allocation unit size" upon formatting a drive, how does it decide what sizes to show? If I select FAT, I see 32KiB and 64KiB, however FAT32's options range from 0.5KiB to 16KiB in powers of two. In exFAT, the options go up to 32MiB.

As I understand it, if you want to make full use of the drive's capacity there may be a minimum due to having to represent the cluster address in a limited number of bits, but I can't think of a reason to have a maximum so small.

Is it just a software limitation?

EDIT: Research tells me that FAT32 can support up to 2TiB volumes (or 16TiB, depending on the cluster size). As a side question: if this is a software limitation, could this go even higher given even higher cluster sizes?

VortixDev
  • 1,214

1 Answers1

2

How big was the drive?

The number of sectors per cluster on FAT is stored in an 8-bit field, on older systems this was a signed field, but it was later changed to be unsigned. Since the maximum power of 2 that can be stored in a one byte field is 128 this limits clusters to 128 sectors, which on a volume with normal 512 byte (logical) sectors limits the cluster size to 64K. Note that if you select 64K your filesystem will be incompatible with windows 95 and earlier.

The total number of clusters on FAT16 is limited to about 2^16 (hence the name FAT16), presumablly your volume is too large to allow smaller cluster sized on FAT16.

As to FAT32 the lower limit is one sector per cluster and AIUI the upper limit is 64 sectors (maximum power of two that can be stored in a signed byte), which on a typical 512 byte sector device works out to 32K. I'm not sure why the formatter doesn't offer 32k, maybe it's an artifical cluster size limit in the formatter, maybe it doesn't like doing a Fat32 format with parameters that would work for FAT16.

plugwash
  • 6,719