13.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 13.2, “Maximum Sizes of File Systems (On-Disk Format)” offers an overview of the current limitations of Linux files and file systems.

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

File System

File Size (Bytes)

File System Size (Bytes)

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)

243-4096 (16 TB-4096 Bytes)

Ext2 or Ext3 (8 kB block size) (systems with 8 kB pages, like Alpha)

246 (64 TB)

245 (32 TB)

ReiserFS v3

246 (64 TB)

245 (32 TB)

XFS

263 (8 EB)

263 (8 EB)

NFSv2 (client side)

231 (2 GB)

263 (8 EB)

NFSv3 (client side)

263 (8 EB)

263 (8 EB)

[Important]Linux Kernel Limits

Table 13.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.