Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am reading about the file systems in Linux from here. This particular sentence kind of confuses me.

For ext3,

  • Maximum individual file size can be from 16 GB to 2 TB.
  • Overall ext3 file system size can be from 2 TB to 32 TB.

So, does the above sentence mean I cannot have a single file that is greater than 2 TB in size?

If that is the case, can't I have a single mysql table which has greater than 2 TB capacity? The tables are stored as per the datadir parameter mentioned in /etc/my.cnf. So assuming, I have a HDD of 4 TB capacity and a mysql table of size 2.5 TB, can the table be fit into the HDD or not?


I am not concerned with the maximum file size as the answer of Barmar specifies.

I am more concerned on finding out will there be any error thrown if I have a single mysql table that is greater than the size of the maximum allowable individual file size of ext3 file system.

share|improve this question

3 Answers 3

According to Limits on Table Size the maximum size of a table on Linux 2.4+ using ext3 is 4TB.

Since MyISAM stores the row data in one file and the index in another file, I guess this is the maximum theoretical size of the data+index. Since ext3 limits files to 2TB, it doesn't seem possible that the row data could exceed this.

share|improve this answer
well I am not particularly concerned with the limits on file size. – Ramesh Jun 6 '14 at 20:40
You asked if the table can fit onto the filesystem. This says that it can. – Barmar Jun 6 '14 at 20:46
yeah. But I did not realize that before you posted your answer. But my intention was originally to know if there will be any error thrown if I have a table greater than the file size limit imposed by ext3. I have modified my question to include that. Nevertheless, your answer pointed me to frame my question correctly. Thanks :) – Ramesh Jun 6 '14 at 20:48

Generally, you should follow the guidelines here as mentioned by @Barmar. This lists off limits imposed by various operating systems, but not necessarily for the file systems. And it even has a somewhat misleading listing of "Linux 2.4+ (using ext3 file system) 4TB".

There is something else that is very important to consider on an ext3 file system when determining maximum file size. Check your block size before making massive database tables. An ext3 partition with a 1k block size has a maximum file size of about 16.5GB. The same exact disk with a 4k block size has a maximum file size of 4TB. A detailed explanation of why can be found here. If you do have a 4k block size, then the documentation on the mysql site is fully accurate. Most installations nowadays have 4k as a default, and I believe that the 4TB file system is just too large for a 1k blocksize, but it certainly doesn't hurt to check

share|improve this answer

Yes, if your underlying filesystem has a file size limit, then you will get errors in MySQL if you try to add data to the point that your file is full.

However, filesystem file size limits are very easily circumvented simply by making your MySQL table PARTITIONed, so that a single table spreads the data over multiple MYD and MYI files.

You should really use ext4 these days instead of ext3. ext4 has a 16 TB file size limit (w/ standard 4k block size).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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