Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why the maximum file size in a filesystem is 2GB? 1

Status
Not open for further replies.

enriqcore

Technical User
Apr 26, 2002
18
AR
Hello,
I work with an AIX Release 3, version 4.
I found that in practice, the maximum file size in one of the filesystems is 2 gigabytes. I would like to know the reason of this boundary.
1) Does it have to do with the block size?
2) How do I find out the block size of a filesystem?

3) I read a technical publication that if you have a block size of 512 bytes, and block addresses of 4 bytes, then you can have in a file:

10 direct blocks
128 indirect blocks (512 divided by 4)
16384 double indirect blocks (128**2)
20971521 triple indirect blocks (128**3)

TOTAL=2113674 blocks = 2113674 * 512 = 1 GB

Then if you had block sizes of 1KB and four bytes addresses, 256 blocks addressable in one block, you would have 16 millions of blocks or 16GB, but because of the limit of address size, the effective space addressable and the maximum file size is 4 GB.

Is that correct? What is the block addressing scheme of AIX
Release 3 version 4?
Thanks in advance





 
The below is a helpful document in understanding:

Most programs had a problem handling files over 2 gig ...or at least that was the standard....of old. Now some programs can handle larger files.


------------------------------------------

To address "normal" files (up to 2GB) AIX uses Direct, Single Indirect and
Double indirect addressing.

Direct addressing
8 fields in the inode contain the absolute address of 8 4KB data blocks on disk
(Used to address files upto 32KB in size (8 x 4KB = 32KB))

Single Indirect addressing
The 9th field does not point to a data block but is a pointer to 1024 addresses
that each point to a 4KB datablock (Used to address files upto 4MB in size
(1024 x 4KB = 4MB))

Double Indirect addressing
The 10th field points to 512 addresses. Each of these 512 addresses points to
1024 more addresses that each point to a 4KB data block. (Used to address files
upto 2GB in size (512 x 1024 x 4KB = 2GB)


In a Large file enabled filesystem (may contain files up to 64GB in size) the
10th field in the inode points to 512 addresses. Each of these 512 addresses
points to 1024 more addresses that each point to a 128KB data block (512 x 1024
x 128KB = 64GB)

The catch is that these 128KB data blocks are made up of 32 contiguous 4KB
blocks and any file greater than 4MB in size will be allocated using the 128KB
data blocks. (Can waste space)
--------------------------------------
Info on Large File enabled:

----------------------------------------------------------------------
4.33
Total open files per system = 1,000,000
Support for files up to 64 GB/Filesystems up to 128 GB (supported)
Maximum size for shared or mapped files 2GB
(but this does not mean that your application can handle or work with files
larger than 2 GB)
physical volume 128 per volume group
Logical volume 512 per volume group

AIX 5L
JFS2 is a new file system type providing the capability to store 1 Terabyte
files. It is the default file system for the 64-bit kernel. Cachefs is enhanced to
work under the 64-bit kernel and will support large file systems. It will handle
files larger than 2 GB, although the cache file does not have to be larger than
2 GB. As a result, data can be accessed faster.

AIX 5.1 offers new flexibility for 32-bit "maxdata" programs by allowing the
segments of the data heap (up to 8 256 MB segments) to be created
dynamically.

Functions JFS2 JFS
--------------------------- -------------------- --------------
Fragments/Block Size 512-4096 Block sizes 512-4096 Frags
Architectural Maximum 4 Petabytes 64 GBytes File Size
Maximum File Size Tested 1 Terabyte 64 GBytes
Architectural Maximum File 4 Petabytes 1 Terabyte System Size
Maximum File System Size 1 Terabyte 1 Terabyte

------------------------


Hope I didn't confuse you........good luck.............
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top