From: Matti Aarnio <matti.aarnio@sonera.fi>
To: axp-list@redhat.com
Subject: Re: Maximum file size
Date: Tue, 2 Mar 1999 14:29:16 +0200 (EET) [thread overview]
Message-ID: <19990302122917Z92300-891+51@mea.tmt.tele.fi> (raw)
In-Reply-To: <36D7EA62.41C67EA6@iis.fhg.de> from Stefan Schroepfer at "Feb 27, 99 01:51:46 pm"
Stefan Schroepfer <scr@iis.fhg.de> asks:
> What is the maximum file size in ext2 filesystems?
> Is there any difference between 32 and 64 bit systems?
> Is there some filesystem implemented in Linux/Alpha,
> which can handle files bigger than 2GB?
The answer is a bit complex.
With 2.0 series kernels there is *radical* difference
in between 32 and 64 bit systems at what they can support.
With latter 2.1 and 2.2 the differences are partly fixed.
Namely in 2.0 the VFS layer supports file offsets/sizes up
to system 'long'/'u_long' values -- 2G-1 for 32-bit machines.
In 2.2 the VFS layer supports offsets/sizes mostly up to
64-bit 'long long', however mainly so called buffer cache
in the kernel limits things in 32-bit systems to 2G-1.
So with 64-bit machines we are limited by filesystem internal
limits, not VFS.
With EXT2 the limit is a bit more complex to tell; it depends
at the block-size in the filesystem, and ultimately it is
limited to be 4G blocks of 512 bytes which is limit for all
block devices in Linux. (And ext2 can't span multiple devices;
a MD RAID* is just *one* device for ext2 ...)
From ftp://mea.tmt.tele.fi/linux/LFS/try-lfs.c comments:
* This program will terminate at llseek() resulting EINVAL
* error. The reason is that the underlying EXT2 FS has its
* own limitations for maximum file sizes depending the basic
* block size used to create the filesystem:
* 1k blocks allow 16 G + epsilon
* 2k blocks allow 256 G + epsilon
* 4k blocks allow 4096 G + epsilon
*
* The full formula for the classical UNIX indirectly addressed block
* index scheme is:
* B = blocksize_in_bytes
* maxsize = ( (B/4)^3 + (B/4)^2 + (B/4) + 10 ) * B
* Epsilon(s) above are thus the first and 2nd power terms, which are
* less than 1/250 of the main term. (1/1000 at 4k blocks)
> Thanks,
> Stefan Schroepfer
> scr@iis.fhg.de
/Matti Aarnio <matti.aarnio@sonera.fi>
next prev parent reply other threads:[~1999-03-02 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-27 12:51 Maximum file size Stefan Schroepfer
1999-02-27 14:22 ` Uncle George
1999-02-27 15:12 ` Sven Esbjerg
1999-02-27 16:36 ` Robert Bowles
1999-02-28 4:58 ` Wes Bauske
1999-02-28 5:48 ` Wes Bauske
1999-03-01 9:46 ` Stefan Schroepfer
1999-03-01 19:06 ` Wes Bauske
1999-03-02 12:29 ` Matti Aarnio [this message]
1999-03-02 14:00 ` Martin Høy
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox