Re: file size limits?

From: Dan <flying.dragon_at_no.spam.please>
Date: Fri Jul 28 2000 - 18:32:47 CST

Well this here is the blurb about ext2fs in the Filesystem-HOWTO text.
You have probably already seen this however.
-------
``Standard'' Ext2fs features

The Ext2fs supports standard Unix file types: regular files, directories,
device special files and symbolic links.

Ext2fs is able to manage filesystems created on really big partitions. While
the original kernel code restricted the maximal
filesystem size to 2 GB, recent work in the VFS layer have raised this limit
to 4 TB. Thus, it is now possible to use big disks without
the need of creating many partitions.

Ext2fs provides long file names. It uses variable length directory entries.
The maximal file name size is 255 characters. This limit
could be extended to 1012 if needed.

Ext2fs reserves some blocks for the super user (root). Normally, 5% of the
blocks are reserved. This allows the administrator to
recover easily from situations where user processes fill up filesystems.
-------

The problem isn't so much about the filesize. If a filesystem can chain
file table blocks (ie. [ blockinfo, datapointer1, ... datapointerN,
nextblockpointer ] )
the filesize is actually infinite (limited only by programming limits
and disk partition sizes).
C/C++/etc functions like fseek() generally use int32 or long uint32 to read
file positions. On ix86 linux there is no difference between an int
and a long int unfortunately.
Taking a break to fix my bike tires, I cat'd a half dozen
mp3s into a 30MB file and ran a loop in a script to continually append this
to a file.

total 4509153
drwxrwxr-x 3 root root 1024 Jul 28 16:53 .
drwxr-xr-x 12 root root 4096 Jul 18 19:04 ..
-rw-rw-r-- 1 dan dan 21902132 Jul 28 16:52 b
-rwxr-xr-x 1 dan dan 72 Jul 28 16:53 bbucket
-rw-r--r-- 1 root root 4577412028 Jul 28 17:19 filesizetest.log
dan@midgard(24.66.250.125):/home/backup>

Ten minutes later when I got the dreaded "cat: write error: No space
left on device" message, this file is nearly 4.5GB (4718592000 bytes)in
size. I
actually filled this entire partition (running the dinky script bbucket
as root preventing the "5% reserved for root" rule). Whether I could
write a small C program using fseek() to read the last byte of this file is
questionable.
I DO remember a mention on Slashdot of a file being able to be up to 32GB
for some reason but I cannot find the article. It may have had something
to do with ext3 and it's journaling system, or more likely some other
filesystem.

scott@waldetech.sk.ca wrote:
>
> Does anyone here know about file size limits under different filesystems
> in Linux? I'm finding references to a 2GB file limit in e2fs, but also
> mention that it is "fixed" with glibc 2.1.2 and a "kernel patch." This
> info was 1999, so I'm wondering if that kernel patch is part of the
> standard kernels now. What is the file size limit now?
>
> What other FS is stable under Linux that would allow me >2GB file size?

-- 
  ,>   )\ `a_     Dan Brown
 (  _  )/ /{_ ~~  email: dan.brown@usask.ca 
  `(,)_,)/               dcmbrown@home.com
   ,<_ ,<_.       phone: 9348992  cell: 2411055
--
Saskatoon Linux Group Mailing List.
--
To unsubscribe, send mail to
'linux-request@slg.org' with
'unsubscribe' in the body.
Received on Fri Jul 28 18:32:47 2000

This archive was generated by hypermail 2.1.8 : Sun Jan 09 2005 - 13:54:00 CST