Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Planning a Workgroup
Planning to Manage File Systems
Chapter 2 93
Each JFS file system has its own intent log. Space is reserved for the
intent log when the file system is created; its size cannot be changed
later. The intent log is not a user-visible file, although you can use the
fsdb tool to dump it.
Normally, user data is not treated as part of a transaction. Instead, it is
put in the buffer cache with the usual UNIX delayed write semantics
(that is, without guarantees of having been written to disk, unless sync
is explicitly run). However, if the application indicates a synchronous
write (for example, by opening a file with the O_SYNC flag), the user data
is treated as part of the transaction, with the same all-or-nothing
guarantee that applies to file system metadata (such as directories,
inodes, free extent maps).
Under what circumstances does the intent log contain file data?
Typically, the intent log contains only information on file-system
metadata, such as superblock, inodes, and directories.
However, file data written synchronously (that is, the file is opened with
the O_SYNC or O_DSYNC option) is logged in the intent log, if the write
block size is 8KB or less. This behavior is true both for Basic JFS and HP
OnLineJFS (also known as Advanced VxFS package), but can be
changed using the nodatainlog option of the mount command (see
mount_vxfs (1M)).
NOTE An NFS server writes synchronously; therefore, it might make sense to
increase the intent log size (newfs option) on an NFS-exported file
system.
What is the recommended size of the intent log?
The intent log size is set by default, based on the file-system size.
Typically, the intent log size is 1 MB.
If the file system is:
• greater than or equal to 8 MB, default is 1024 blocks
• greater than or equal to 2 MB, default is 128 blocks
• less than 2 MB, default is 32 blocks
Might there be a reason to increase the size of the intent log? What
happens if it fills up? Will errors occur or performance be affected?