File Size Limit

28,993

Solution 1

File size is limited by filesystem type not by OS. Typically, OS supports several filesystems, so there is no such thing like "OS file size limit". There are limits for well-known filesystems:

FAT32 - 4Gib  
NTFS - 16Eib  
ext2/3 - 16Gib - 2Tib (depends from block size)  
ext4 - 16Gib - 16Tib  
XFS - 9Eib  
ZFS - 16Eib

Solution 2

Since more than a decade, 32 bit Linux applications are able to access files larger than 2 GiB (2^31) thanks to the implementation of large file support. The current OS limitation is 8 EiB (2^63) which shouldn't hit the common of us before a while...

You would need a file system that makes no lower limit on file size too.

Share:
28,993

Related videos on Youtube

vikram rao
Author by

vikram rao

Updated on September 18, 2022

Comments

  • vikram rao
    vikram rao over 1 year

    What is the maximum file size limit in rhel 32 bit OS, is there any OS limitation for the file size , if there is any limitation set then please tell me what will be for root & oaa.

  • vikram rao
    vikram rao about 8 years
    Hi Thanks for your reply, my requirement is i have file in 32 BIT rhel 5 and it gradually increases up to 1.5 GB in a day, in case if it reaches more than 4 GB ours guys says the process which is writting to a file will crash, says there is no limitation for 64 GB but in 32 GB it should not cross 4Gb, is it true what is the information provided to me ...?
  • user1700494
    user1700494 about 8 years
    32bit OSes can use up to 4gb of RAM. It is not related to disk space.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' about 8 years
    Technically there is an OS file size limit: 2^64 bytes. But I don't know of any common filesystem that allows such large files, so the filesystem is the limiting factor.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' about 8 years
    @vikramrao The only reason why the process would crash is if it's badly written or extremely old. Not the fault of the OS.
  • jlliagre
    jlliagre about 8 years
    @Gilles, At least ZFS would support it but in that case, the limit is more due to the hardware capacity to store such a large file.
  • Bemipefe
    Bemipefe over 6 years
    2^31 bytes ~ 2 GiB not TiB
  • Stéphane Chazelas
    Stéphane Chazelas over 6 years
    truncate -s 10T is a quicker way to create a 10TiB large file.
  • Bemipefe
    Bemipefe over 6 years
    The filesystem type can be related to file size limit but it's not the only thing that needs to be checked. Having a 32 bit kernel actually do implicitly limits the file size since by default LFS is not enabled. Also the libraries used by a program should be compiled with the LFS support if the program is compiled for a 32 bit system.
  • Bemipefe
    Bemipefe over 6 years
    @Stéphane Chazelas Although I only wanted to attempt the creation of 3 GiB file I agree that using truncate can be quicker than using dd.