I dont understand why there is restriction in the file size and total addressable memory of each file system. For example why FAT32 can have a maximum file size of 4GB?

closed as unclear what you're asking by Flup, Anthony Geoghegan, Eric Renouf, Anthon, Rui F Ribeiro Sep 30 '16 at 13:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Basically, most of it comes down to old standards (FAT16/32, especially) that were designed back when 4GB files were unheard of, and a partition of 2TB was mind-bogglingly large. They made trade-offs in the standards that, for the time, were completely reasonable.

If you look into it, the old filesystems are very limited, because the use of computers was limited at the time. Now, we have the ability to create partitions so large we likely won't have their matching devices for another 20-30 years.


I'm going to omit a great deal of programming theory and OS design here or this'll take days..

Simply put, because at the time they were written certain assumptions and decisions were made in the implementation, specifically in how to address and access files.

In computer parlance, there has to be a maximum value for anything and everything -- infinite doesn't exist.

More importantly, every directory entry needs to have a unique way of identifying itself -- ownership, what special attributes and permissions it has, what kind of file it is (directory, symlink, hard link, regular file, pipe, block device, character device, and so on). On most unix filesystems, this is called an 'inode number', and since each of those has to be unique you can never have more files than you have possible different numbers.

The other problem is (or was) one of optimization; since filesystem operations are something your system will be doing quite often, designers are naturally inclined to pick the smallest size number range they think is going to be reasonable, because computers can do arithmetic with (bitlength wise) smaller numbers much faster than larger ones... And when the largest hard drives you see in the market are one or two gigabytes, you may be inclined to assume that 65 thousand files and a maximum filesystem size of 2 terabytes is reasonably forward thinking.

Then time passes, and less than a decade later kernel programmers curse your name and your lack of foresight as they try to reverse engineer better capacity into your filesystem code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.