The inode information is kept in
the cylinder information block.
An inode contains all the information about a file except
its name, which is kept in a directory.
An inode is 128 bytes long.
One inode is created for every 2K of storage available in
This parameter can be changed
is used to create the filesystem.
What does a ufs inode contain?
A ufs inode contains the following:
type and mode of the file--the type can be regular,
directory, block, character,
symbolic link, or FIFO, also known as named pipe;
the mode is the set of read-write-execute permissions
number of hard links to the file
user ID of the owner of the file
group ID to which the file belongs
number of bytes in the file
two arrays comprising a total of 15 disk-block addresses
``The ufs inode's disk block addresses'')
date and time the file was last accessed
date and time the file was last modified
date and time the file was created
The ufs inode's disk block addresses
The heart of the inode is two arrays that, together,
comprise 15 disk-block addresses.
The following figure illustrates
this chaining of address blocks stemming from the inode.
The first array contains 12 direct addresses,
that is, addresses that point directly to
the first 12 logical storage blocks
of the contents of the file (addresses 0-11).
If the file is larger than 12 logical blocks,
the first address of the second array (address 0)
points to an indirect block, which
contains direct addresses instead of file contents.
The second address (1)
points to a double indirect block,
which contains addresses of indirect blocks.
The third address (2) points to a triple indirect block,
which contains addresses of double indirect blocks.
The address chain in a ufs filesystem
The following table shows
the number of bytes addressable by
the different levels of indirection in
the inode address array for ufs filesystems.
These numbers are calculated using
the logical block size of the filesystem
and the number of bytes used to hold an address.
The table shows
the number of bytes addressable using the level of
indirection in the column header
plus all lower levels of addressing.
For example, the table values
for single indirect blocks also
include bytes addressable by direct blocks;
and the table values for indirect blocks include
bytes addressable by direct blocks
and single indirect blocks.
In a filesystem with a 2048-byte block size,
files larger than 512MB use triple indirect blocks.
Maximum number of bytes addressable by
The theoretical maximum size of
a ufs filesystem is the same as the size
of a file addressable with triple indirection.
In practice, however, file size is limited by
the size field in the inode.
This is a signed 32-bit field, so file sizes are limited
Because of the large size of ufs logical blocks,
double indirect blocks rarely appear
in ufs filesystems.
The result is that data retrieval in large files
is much quicker than it would otherwise be.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004