Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a System: Managing Disks and Files
Managing Swap and Dump
Chapter 6 669
Several file systems can be used for file system swap. The tunable system
parameter
nswapfs
determines the maximum number of file systems
you can enable for swap. You can dynamically create file system swap
using either SAM or the swapon command. As with device swap, you
cannot modify or remove file system swap without rebooting, although
you can change options within /etc/fstab file without rebooting as long
as they don’t conflict with previous requests.
If you use swapon to add file system swap, follow these steps:
1. Choose a file system for swap space use. Be sure to consult
“Guidelines for Setting Up File System Swap Areas” on page 667.
2. Determine the mount point directory (or the root directory) of the file
system and specify its absolute path name on the command line for
swapon.
3. Examine the swapon command options (see swapon (1M)). The
options allow you to customize how your file system swap will work.
4. To verify that you have enabled your new file system, run the
command swapinfo. You should see a line that begins fs,
corresponding with the mount point you specified. This indicates
that your dynamic file system swap space is now available.
5. Add your file system swap to the /etc/fstab file if you want the new
file system swap to be enabled when you boot your system. See fstab
(4) for more information.
Once file system swap has been enabled, you can remove it either by
using SAM or by following these steps:
1. If you used SAM to add file system swap or manually added a swapfs
type entry for this file system in /etc/fstab, then edit the
/etc/fstab file to remove the entry for the specific file system swap
area you want to remove.
2. Reboot your system by running shutdown -r.
To modify a file system swap, you first remove it and then re-add the
changed swap using the five steps shown above.