Обсуждение: Largest filesize under Linux

Поиск
Список
Период
Сортировка

Largest filesize under Linux

От
"Partho Bhowmick"
Дата:
I am working on extending the functionality of PostgreSQL on Linux.
I need to know what's the largest filesize for a single file that I can have
under Linux?

Regards,
Partho



Re: Largest filesize under Linux

От
byron@cc.gatech.edu (Byron A Jeff)
Дата:
In article <e4pba.794$yy2.89177201@newssvr13.news.prodigy.com>,
Partho Bhowmick <pbhowmick@sbcglobal.net> wrote:
-I am working on extending the functionality of PostgreSQL on Linux.
-I need to know what's the largest filesize for a single file that I can have
-under Linux?

The answer is definitive: it depends...

There are multiple layers that have file size restrictions (from bottom to top):

* The filesystem itself on the disk.
* The Virtual File System implementation in the kernel.
* The filesystem library interface.
* The application.

The max file size is the minimum of the allowable file sizes for each
component. Generally there are two available sizes:

* 2.1GB imposed by a +/- 31 bit file offset. Until recently the VFS, library,
  and applications imposed this limit.
* 9 million TB imposed by a +/- 63 bit file offset. Most recent distributions
  have all 4 elements implementing this filesize.

Here's a simple test. On a filesystem with more than 5GB available try the
following:

# dd if=/dev/zero of=testfilesize bs=1024K count=3000

This will attempt to create a 3GB file which exceeds the 2.1GB max imposed by
31 bit offsets. If the file creation is successful, you can pretty much
create a file of any size.

BAJ

Re: Largest filesize under Linux

От
Christopher Browne
Дата:
Quoth "Partho Bhowmick" <pbhowmick@sbcglobal.net>:
> I am working on extending the functionality of PostgreSQL on Linux.
> I need to know what's the largest filesize for a single file that I can have
> under Linux?

That depends.

It depends on the size supported by the filesystem.  Usually that's at
least 2TB, these days.  (For ext2)  Any of the interesting alternative
FSes (xfs, jfs, reiserfs) offer Way Big file sizes, >2TB.

But you also need for the file size to be supported by:
 a) GLIBC, and
 b) The kernel VFS.

I believe that recent kernels and GLIBCs allow arbitrary large files,
but you will have to check on your favorite kernel and libraries, as
milage may vary.  And it's disputable whether or not that is
necessarily going to be a "Linux" question...
--
output = reverse("moc.enworbbc@" "enworbbc")
http://www3.sympatico.ca/cbbrowne/fs.html
"One often contradicts  an opinion when what is  uncongenial is really
the tone in which it was conveyed." -- Nietzsche