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,194
  • 2
  • 13
  • 22
  • 1
    Related: [My answer](https://superuser.com/a/1273226/219095) on a question about exFAT clusters. tl;dr: The format wizard is quite limited. – Daniel B May 09 '18 at 21:34
  • This is just a reasonable guess but I would assume that the cluster sizes available were chosen by the software designer. The lower limit to the cluster size is adjusted as necessary by the volume size. As the software will by design not format a FAT32 volume larger than 32 GB and since a 16K cluster is sufficient to support it 16K was arbitrarily chosen as the upper limit. I don't know why the imposed limit is 32 GB. Third party software does not have this limit. – LMiller7 May 09 '18 at 22:31

1 Answers1

1

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
  • 5,994
  • 2
  • 18
  • 25
  • Thanks for your response! Do you have any idea what's going on with the exFAT cluster sizes then, considering it goes up to 32MiB? – VortixDev Jun 08 '18 at 01:31
  • No, I have no idea what the real limits of exfat verses artificial limits from the formatter are. – plugwash Jun 08 '18 at 02:12