1.4 Large File Support in Linux

Originally, Linux supported a maximum file size of 2 GiB (231 bytes). Unless a file system comes with large file support, the maximum file size on a 32-bit system is 2 GiB.

Currently, all of our standard file systems have LFS (large file support), which gives a maximum file size of 263 bytes in theory. Table 1-3 offers an overview of the current on-disk format limitations of Linux files and file systems. The numbers in the table assume that the file systems are using 4 KiB block size, which is a common standard. When using different block sizes, the results are different. The maximum file sizes in Table 1-3 can be larger than the file system's actual size when using sparse blocks.

NOTE:In this document: 1024 Bytes = 1 KiB; 1024 KiB = 1 MiB; 1024 MiB = 1 GiB; 1024 GiB = 1 TiB; 1024 TiB = 1 PiB; 1024 PiB = 1 EiB (see also NIST: Prefixes for Binary Multiples.

Table 1-3 Maximum Sizes of Files and File Systems (On-Disk Format, 4 KiB Block Size)

File System (4 KiB Block Size)

Maximum File System Size

Maximum File Size

Btrfs

16 EiB

16 EiB

Ext3

16 TiB

2 TiB

OCFS2 (a cluster-aware file system available in the High Availability Extension)

16 TiB

1 EiB

ReiserFS v3.6

16 TiB

1 EiB

XFS

8 EiB

8 EiB

NFSv2 (client side)

8 EiB

2 GiB

NFSv3 (client side)

8 EiB

8 EiB

IMPORTANT:Table 1-3 describes the limitations regarding the on-disk format. The Linux 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 cannot exceed 2 TiB (241 bytes).

File System Size

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