Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Planning a Workgroup
Planning to Manage File Systems
Chapter 290
JFS allocates space to files in the form of extents, adjacent disk blocks
that are treated as a unit. Extents can vary in size from a single block to
many megabytes. Organizing file data this way allows JFS to issue large
I/O requests, which is more efficient than reading or writing a single
block at a time.
JFS groups structural changes into transactions, and records these in an
intent log on the disk before any changes are actually made. If the
system crashes, fsck need only scan the intent log and complete
transactions that were in progress. This provides for greater file system
integrity and greatly reduces recovery time, compared to a traditional
file system that must be scanned from beginning to end for
inconsistencies.
JFS offers mount options to delay or disable transaction logging. This
allows the system administrator to make trade-offs between file system
integrity and performance, guaranteeing the integrity of critical file
systems, while optimizing the performance of non-critical or temporary
file systems.
When you have the optional HP OnLineJFS product, many
administrative operations can be performed on an active JFS file system,
including resizing it, reorganizing its files to make them contiguous and
reorganizing directories to reclaim unused space. In addition, a snapshot
of a mounted file system can be taken for backup. The snapshot provides
a consistent, read-only view of the file system at a certain moment in
time, even as the file system it is a snapshot of continues to change.
Online administration, along with fast recovery made possible by the
intent log, significantly increase file system availability.
What are the contents of a JFS transaction?
A transaction consists of all individual system operations related to a
change. For example, writing to a file might cause it to grow, which would
involve allocating additional space, updating its extent map, increasing
its size, and updating its last modification time. These changes are
treated as a single transaction, which is logged before any of the changes
are actually made. When all the changes are made, this fact is also
recorded in the intent log.
JFS transactions are guaranteed to be atomic; that is, either all of the
individual operations that comprise a transaction complete successfully
or none of them do. The file system is not left in an intermediate state,
with some operations completed and others not, even after a system
crash. Generally, a transaction is committed (that is, guaranteed to