Adverts

While setting up my Bacula based backup system I found that I needed, or at least felt I should know, the maximum file size that I could write to disk. A quick search for the maximum file size for an ext3 file system indicated that it was related to the block size used on the disk. A block is a standard sized chunk of information on a hard disk and all files use an exact number of blocks. If a file does not fill a block completely the remainder of the block is wasted. The block size is also important to the kernel which maintains pages of information that may be written to disk. It is sensible, from an efficiency point of view, to make the page size the same as the block size.

With an ext3 file system the block size is decided when the disk is formatted. If no option is selected the formatting program will algorithmically choose the block size from its list of supported sizes 1024, 2048 and 4096 bytes. Modern drives will generally have the block size set as 4096. The good news is that with 4K blocks the maximum file size is 2TiB which is far more than my total storage.

 Block Size
Maximum File Size Maximum Filesystem Size
 1KiB (1024B)  16GiB  2TiB
 2KiB (2048B)  256GiB  8TiB
 4KiB (4096B)
 2TiB  16TiB
 8KiB (8192B)
 2TiB  32TiB

The block size of a partition can be recovered with the "dumpe2fs" application supplying the -h option and the partition name such as /dev/hda1. This will provide you with roughly a page of data detailing many aspects of the file system. The most interesting piece of information from our point of view is the "Block Size:" line which on my drive indicates 4096 bytes per block.

Adverts

Donate and Help

Please support this site and
Bandwidth doesn't grow on trees y' know :o)

Adverts

Get Adsense