VERITAS File System 3.5 (HP OnlineJFS/JFS 3.5) Administrator's Guide (August 2003)

Chapter 1
The VERITAS File System
Extent Based Allocation
19
Extent Based Allocation
Disk space is allocated in 1024-byte sectors to form logical blocks. VxFS supports logical block sizes of
1024, 2048, 4096, and 8192 bytes. The default block size depends on the size of the file system. For file
systems up to 4 TB, the block size is 1K. The block size is 2K for file systems from 4 TB to 8 TB, 4K for
file systems from 8 TB to 16 TB, and 8K for file systems larger than 16 TB (see “The VxFS Version 5
Disk Layout” on page 124 for more information).
An extent is defined as one or more adjacent blocks of data within the file system. An extent is presented
as an address-length pair, which identifies the starting block address and the length of the extent (in file
system or logical blocks). VxFS allocates storage in groups of extents rather than a block at a time.
Extents allow disk I/O to take place in units of multiple blocks if storage is allocated in consecutive
blocks. For sequential I/O, multiple block operations are considerably faster than block-at-a-time
operations; almost all disk drives accept I/O operations of multiple blocks.
Extent allocation only slightly alters the interpretation of addressed blocks from the inode structure
compared to block based inodes. A VxFS inode references 10 direct extents, each of which are pairs of
starting block addresses and lengths in blocks. The VxFS inode also points to two indirect address
extents, which contain the addresses of other extents:
The first indirect address extent is used for single indirection; each entry in the extent indicates the
starting block number of an indirect data extent.
The second indirect address extent is used for double indirection; each entry in the extent indicates
the starting block number of a single indirect address extent.
Each indirect address extent is 8K long and contains 2048 entries. All indirect data extents for a file must
be the same size; this size is set when the first indirect data extent is allocated and stored in the inode.
Directory inodes always use an 8K indirect data extent size. By default, regular file inodes also use an 8K
indirect data extent size that can be altered with vxtunefs (see
“Tuning VxFS I/O Parameters” on page 42 );
these inodes allocate the indirect data extents in clusters to simulate larger extents.