How to check filesystem limit for Linux files larger than 2GB?

Posted on 2012-08-29
Last Modified: 2013-10-08
I am working with an old system:

[oracle]$ uname -a
Linux 2.4.9-e.74enterprise #1 SMP Wed Oct 8 19:59:01 EDT 2008 i686 unknown

I am guessing that there is some FS parameter that LIMIT the size of the file but I do not know how to check it?

Some filesystem support files larger than 2GB  as /usr3 but /usr1 does not support it.
Find next a description of the filesystems ..:

Filesystem            Size  Used Avail Use% Mounted on
/dev/cci/cp2          3.7G  1.2G  2.2G  35% /
/dev/cci/cp1         197M   19M  168M  11% /boot
/dev/cci/cp3         3.7G  2.2G  1.3G  62% /oracle
none                    3.9G     0  3.9G   0% /dev/shm
/dev/cci/cp7         262G  118G  131G  48% /usr1
/dev/cci/cp1         275G  145G  116G  56% /usr2
/dev/cci/cp1         275G  129G  132G  50% /usr3
/dev/cci/cp6          3.7G  268M  3.2G   8% /var
Question by:Enrique Gomez Esteban
    LVL 19

    Expert Comment


    I would have thought they were all ext3 at least which means 2GB files would be ok but I've not seen /dev/cci/cp* before.

    type `mount` to check the file system types used and then `df -hi` to look at inodes (wild stab in dark)

    You can see if there is any options in /etc/fstab as well...

    Author Comment

    by:Enrique Gomez Esteban
    Well,  sorry  I did a copy/paste mistake. The right device are:

    /dev/cciss/c0d0p2     3.7G  1.2G  2.2G  35% /
    /dev/cciss/c0d0p1     197M   19M  168M  11% /boot
    /dev/cciss/c0d0p3     3.7G  2.3G  1.2G  65% /oracle
    none                  3.9G     0  3.9G   0% /dev/shm
    /dev/cciss/c0d0p7     262G  118G  131G  48% /usr1
    /dev/cciss/c0d1p1     275G  145G  116G  56% /usr2
    /dev/cciss/c0d2p1     275G  129G  132G  50% /usr3
    /dev/cciss/c0d0p6     3.7G  269M  3.2G   8% /var

    On other hand, /usr3 is writing  files larger than 2GB but it fails when writing to /usr1
    LVL 19

    Expert Comment

    It's the filesytem type which generally defines the file size limits - filesystem type is the main useful thing that "df" doesn't return!

    What does "mount" show?
    LVL 19

    Expert Comment

    and the df -hi and the mount command output?
    LVL 19

    Expert Comment

    Can you write anything to usr1? My thinking is along the lines of you are running out of inodes which I've not seen in years but can still happen if there are lots of small files on the filesystem. The df -i bit will show the inode usage.

    Author Comment

    by:Enrique Gomez Esteban
    I am posting your requests.  Now, I am not sure if  any fix has just been applied so I will re-test to be sure the problem - Cannot write any file larger than 2Gb into /usr1 but
    it works into /usr3 -  still happens in this server.


    [oracle@42000 oracle]$ mount
    /dev/cciss/c0d0p2 on / type ext3 (rw)
    none on /proc type proc (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)
    /dev/cciss/c0d0p1 on /boot type ext3 (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/cciss/c0d0p3 on /oracle type ext3 (rw)
    none on /dev/shm type tmpfs (rw)
    /dev/cciss/c0d0p7 on /usr1 type ext3 (rw)
    /dev/cciss/c0d1p1 on /usr2 type ext3 (rw)
    /dev/cciss/c0d2p1 on /usr3 type ext3 (rw,usrquota,grpquota)
    /dev/cciss/c0d0p6 on /var type ext3 (rw)
    /dev/cciss/c1d0p1 on /backup type ext3 (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    [oracle@42000 oracle]$

    [oracle@42000 oracle]$ df -hi
    Filesystem            Inodes   IUsed   IFree IUse% Mounted on
    /dev/cciss/c0d0p2       476k     61k    415k   13% /
    /dev/cciss/c0d0p1        51k      44     50k    1% /boot
    /dev/cciss/c0d0p3       476k     52k    424k   11% /oracle
    none                   1005k       1   1005k    1% /dev/shm
    /dev/cciss/c0d0p7        33M     170     33M    1% /usr1
    /dev/cciss/c0d1p1        35M    7.8M     27M   23% /usr2
    /dev/cciss/c0d2p1        35M     14k     34M    1% /usr3
    /dev/cciss/c0d0p6       476k    1.9k    474k    1% /var

    [oracle@42000 oradata]$ pwd
    [oracle@42000 oradata]$ touch pepe
    [oracle@42000 oradata]$ ls -la pe*
    -rw-r--r--    1 oracle8  dba             0 Aug 30 10:11 pepe
    [oracle@42000 oradata]
    LVL 19

    Accepted Solution

    On ext3 (and ext2) systems, the maximum file size is determined by the Block Size of the partition.  You can find out the block size from the following command:

    sudo dumpe2fs <device> | grep "Block size:"

    ... so for /dev/cciss/cd0d0p7 (/usr1):

    sudo dumpe2fs /dev/cciss/cd0d0p7 | grep "Block size:"

    A block size of 1024 should result in a 16GB maximum file size.  For a 2GB maximum, a block size of 128 would be required (by my maths) - which is far too small to be reasonably useful.  I'd expect the problem you're facing isn't ext3.  The /dev/cciss devices are HP Smart Arrays and you could be meeting an issue on the underlying hardware.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now