Jump to content

FAT32 With 512-byte Clusters


Recommended Posts

Hey folks!

I've searched high and low for the answer to this, so I hope I'm not repeating this question.  What would like to know is this:  Can I format a 2 TB partition (as in a USB portable HDD) using FAT32 but with 512 byte clusters?  I'm aware the NT-family OSs only create 32 GB FAT32 partitions, so let's just assume I create the partition with a third party application.  That aside, is it safe to create a large partition with such a small cluster size?

Performance (as in speed) is NOT a priority.  I simply want to cram as much as I can on to a backup drive and lessen the overhead used by NTFS.  I'm sure a large FAT32 partition will be as slow as snot.

Also, will the FAT table become too large (or at least larger than the MFT of an equivalent sized NTFS partition?)

Thanks all!

:)

 

Link to comment
Share on other sites


No, you cannot, not 512 bytes cluster.
The "right " cluster size for that size of volume is 32 KB.

FAT32 has a 32 bit (or 4bytes) sized file address table (and that explains its name quite nicely).

A 32 bit value has 2^32 possible values, including 0.

Hence you can index - roughly as few values are reserved - something less than 4,294,967,296 clusters, let's say 4,294,967,290.

Now, when you have 4,294,967,290 x 512 bytes/cluster you could have a max capacity  in theory (last addressable cluster) of 2,199,023,252,480 bytes, but each of the two fat tables will need to be 4,294,967,290 x 4  = 17,179,869,160 bytes in size (huge and slow, even in  theory)

BUT in practice the actual useful values stored in a 32 bit FAT table address are actually only 28-bit:

https://superuser.com/questions/983139/why-is-fat32-limited-to-just-under-228-clusters

so you are limited to 2^28-1-a few reserved values, total 268,435,445.

This gives us roughly 268,435,445 x 512 = 137,438,947,840 i.e. roughly 128 GB

AND additionally (but this only applies to MS defaults/tools), 

https://web.archive.org/web/20150331162734/https://support.microsoft.com/en-us/kb/314463

Quote

You cannot decrease the cluster size on a FAT32 volume so that the size of the FAT is larger than 16 megabytes (MB) minus 64 KB.

If you check the "standard" MS format tables:
https://support.microsoft.com/en-us/help/140365/default-cluster-size-for-ntfs-fat-and-exfat

if you temporarily set aside the artificial limitation introduced in NT 4.00 and later systems you will notice how cluster size is proportional to volume size, and this happens because the idea is to keep FAT tables of a decent size.

So you can use a "third party tool" to format a 2 TB volume, BUT you will need to choose a cluster size that complies with the set limitations.

The larger the cluster size the faster would be the filesystem, but there will be more "slack space", areas belonging to a cluster but not occupied by files.

If you plan to store millions of 512 bytes in size this is an issue, if you store a small number of huge files it is unnoticeable.

Use this:

http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm

that BTW has this to say:

Quote

It is also possible to set the cluster size with a -cN parameter where N is the number of sectors per cluster. On a hard disk, which is the only sort we support, one sector is 512 bytes. The cluster size will be N times 512. I played around with this, and it seems that Windows XP supports small cluster sizes, except that chkdsk runs very slowly, presumably because it needs to read the huge FAT that results from these settings. Given the nature of FAT32, you can't reduce the cluster size such that the number of clusters is more than 228. I'd recommend using the default cluster sizes, which are the Microsoft recommended ones, unless you need to force them for testing or something

http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm

jaclaz

Link to comment
Share on other sites

Thanks so much @jaclaz.  I've always known that the Windows 9x format command stepped up the cluster size for that reason of efficiency and limitations.  I had also known however that there was an undocumented cluster format feature, which you've explained to me.  Thanks again.

You're in Italy right?  How have things been where you are, in terms of the current crisis?  Stay healthy

 

Link to comment
Share on other sites

1 hour ago, Jody Thornton said:

You're in Italy right?  How have things been where you are, in terms of the current crisis?  Stay healthy

Yep, the situation is (and has been) more or less cool in the area I live in (Tuscany).

Of course we use all the precautions, surgical masks, etc. (and we will need to use them for a looong period) but - little by little the Governement is loosening a bit the lockdown rules (since the 4th of May).

Movements are still limited to motivated reasons, and (still) only intra-regional. 

There is (undestandably) abroad the idea that Italy is a "monolith", but in reality the really serious problems were limited to 4 Northern regions (Lumbardy, Piedmont, Veneto and Emilia Romagna), we are mid-way both geographically and in number of cases and deaths and the southern regions all in all had it with much smaller effects.

Even today, a few weeks after the peak, those 4 regions are about half or more than total number of both new cases and deaths:
https://github.com/pcm-dpc/COVID-19/blob/master/schede-riepilogative/regioni/dpc-covid19-ita-scheda-regioni-20200510.pdf

Out of the current total of 219,070 cases, those 4 regions make 81,507+28,665+24,796+18,722= 153,690 or 153,690/219,070= 70%

The situation, particularly  in Lumbardy, has been tragic :(, even if it is a densely populated region, the numbers are impressive.

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...