18.4. Large File Support in Linux

Originally, Linux supported a maximum file size of 2 GB. This was enough before the explosion of multimedia and as long as no one tried to manipulate huge databases on Linux. Becoming more and more important for server computing, the kernel and C library were modified to support file sizes larger than 2 GB when using a new set of interfaces that applications must use. Today, almost all major file systems offer LFS support, allowing you to perform high-end computing.

Table 18.2. “Maximum Sizes of File Systems (On-Disk Format)” offers an overview of the current limitations of Linux files and file systems.

Table 18.2. Maximum Sizes of File Systems (On-Disk Format)

File SystemFile Size [Byte]File System Size [Byte]
Ext2 or Ext3 (1 kB block size)234 (16 GB)241 (2 TB)
Ext2 or Ext3 (2 kB block size)238 (256 GB)243 (8 TB)
Ext2 or Ext3 (4 kB block size)241 (2 TB)244 (16 TB)
Ext2 or Ext3 (8 kB block size) (systems with 8 kB pages, like Alpha)246 (64 TB)245 (32 TB)
ReiserFS 3.5232 (4 GB)244 (16 TB)
ReiserFS 3.6 (under Linux 2.4)260 (1 EB)244 (16 TB)
XFS263 (8 EB)263 (8 EB)
JFS (512 byte block size)263 (8 EB)249 (512 TB)
JFS (4 kB block size)263 (8 EB)252 (4 PB)
NFSv2 (client side)231 (2 GB)263 (8 EB)
NFSv3 (client side)263 (8 EB)263 (8 EB)
[Important]Linux Kernel Limits

Table 18.2. “Maximum Sizes of File Systems (On-Disk Format)” describes the limitations regarding the on-disk format. The 2.6 kernel imposes its own limits on the size of files and file systems handled by it. These are as follows:

File Size

On 32-bit systems, files may not exceed the size of 2 TB (241 bytes).

File System Size

File systems may be up to 273 bytes large. However, this limit is still out of reach for the currently available hardware.