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

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

[oracle]$ uname -a
Linux XBXD_42000.dom.es 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

ID: 38344844

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
ID: 38345110
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 20

Expert Comment

ID: 38345658
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?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 19

Expert Comment

ID: 38345787
and the df -hi and the mount command output?
LVL 19

Expert Comment

ID: 38348092
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
ID: 38349287
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

Barthax earned 500 total points
ID: 39486855
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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

809 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