From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 339 invoked from network); 2 Mar 1999 12:33:33 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 2 Mar 1999 12:33:33 -0000 Received: from mea.tmt.tele.fi (mea.tmt.tele.fi [194.252.70.162]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id HAA24787 for ; Tue, 2 Mar 1999 07:30:25 -0500 Received: by mea.tmt.tele.fi id <92300-891>; Tue, 2 Mar 1999 14:29:16 +0200 Subject: Re: Maximum file size In-Reply-To: <36D7EA62.41C67EA6@iis.fhg.de> from Stefan Schroepfer at "Feb 27, 99 01:51:46 pm" To: axp-list@redhat.com Date: Tue, 2 Mar 1999 14:29:16 +0200 (EET) From: Matti Aarnio Phone: +358-20402082 (office, with redirection to cellular) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <19990302122917Z92300-891+51@mea.tmt.tele.fi> Stefan Schroepfer 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