HP-UX System Administrator's Guide: Routine Management Tasks

Defragmenting a JFS File System
“To defragment a JFS file system using HP SMH” (page 199)
“To defragment a JFS file system using fsadm ” (page 199)
“Daily Defragmentation ” (page 199)
HP-UX System Administrator’s Guide: Configuration Management
To maintain performance, particularly on file systems with very large files, JFS provides
the means to reorder disk space to regain contiguous areas on which to write files. This
process of defragmentation should be performed periodically.
To defragment a JFS file system using HP SMH
1. Access the HP SMH Homepage as root.
2. Select Tools, Disks and File Systems, File Systems. This will display a list of
file systems.
3. Select the desired JFS (VxFS) file system. You can now display extent or directory
fragmentation for the file system, or click on the Defragment Extents... or
Defragment Directories... actions on the right side of the page.
For more information, consult HP SMH’s online help.
To defragment a JFS file system using fsadm
Execute the following to perform both directory and extent reorganization and to
generate reports before and after reorganization:
fsadm -d -D -e -E /mount_point
For detailed information, consult fsadm_vxfs(1M).
Daily Defragmentation
To maintain optimal performance on busy file systems, it may be necessary to
defragment them nightly.
For example, to defragment every evening at 9 p.m. all the extents and directories
within the file system mounted at /home, include the following entry in a file used by
cron(1M):
0 21 * * * fsadm -d -e /home
Configurable Kernel Parameters
In some cases, you may be able to get the results you need by resetting kernel
parameters. For example, if a user frequently runs out of processes (symptom no more
processes), raising the value of maxuprc might be the answer.
Making Changes 199