VERITAS File System 3.5 (HP OnlineJFS/JFS 3.5) Administrator's Guide (August 2003)
Chapter 4
Application Interface
Extent Information
59
NOTE Because VX_CONTIGUOUS is not a persistent flag, space will not be allocated contiguously after
doing a file system restore.
If the VX_NORESERVE flag is set, the reservation value in the inode is not changed. This flag is used by
applications to do temporary reservation. Any space past the end of the file is given up when the file is closed.
For example, if the cp command is copying a file that is 1 MB long, it can request a 1 MB reservation with the
VX_NORESERVE flag set. The space is allocated, but the reservation in the file is left at 0. If the program aborts
for any reason or the system crashes, the unused space past the end of the file is released. When the program
finishes, there is no cleanup because the reservation was never recorded on disk.
If the VX_CHGSIZE flag is set, the file size is increased to match the reservation amount. This flag can be used
to create files with uninitialized data. Because this allows uninitialized data in files, it is restricted to users
with appropriate privileges.
It is possible to use these flags in combination. For example, using VX_CHGSIZE and VX_NORESERVE changes
the file size but does not set any reservation. When the file is truncated, the space is freed. If the
VX_NORESERVE flag had not been used, the reservation would have been set on disk along with the file size.
Space reservation is used to make sure applications do not fail because the file system is out of space. An
application can preallocate space for all the files it needs before starting to do any work. By allocating space
in advance, the file is optimally allocated for performance, and file accesses are not slowed down by the need
to allocate storage. This allocation of resources can be important in applications that require a guaranteed
response time.
With very large files, use of space reservation can avoid the need to use indirect extents. It can also improve
performance and reduce fragmentation by guaranteeing that the file consists of large contiguous extents.
Sometimes when critical file systems run out of space, cron jobs, mail, or printer requests fail. These failures
are harder to track if the logs kept by the application cannot be written due to a lack of space on the file
system.
By reserving space for key log files, the logs will not fail when the system runs out of space. Process
accounting files can also have space reserved so accounting records will not be lost if the file system runs out
of space. In addition, by using the VX_NOEXTEND flag for log files, the maximum size of these files can be
limited. This can prevent a runaway failure in one component of the system from filling the file system with
error messages and causing other failures. If the VX_NOEXTEND flag is used for log files, the logs should be
cleaned up before they reach the size limit in order to avoid losing information.