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

Administering a System: Managing Disks and Files
Managing Swap and Dump
Chapter 6670
NOTE If you have an entry in /etc/fstab defining the swap, but the swap has
not been enabled using SAM or swapon, then you can just remove the
entry either with SAM or by editing /etc/fstab. In this case, no reboot
is necessary.
Configuring Primary and Secondary Swap
You can configure primary swap through the kernel configuration file,
using either HP-UX commands or SAM.
You can also do the following to manage your primary swap space:
Increase primary swap.
If you are using logical volumes, you may want to first attempt to
extend the disk space allocated for the primary swap logical volume
using the lvextend command or SAM. However, you will only
succeed if disk space (physical extents) contiguous with the existing
swap space is still available, which is unlikely. You must reboot the
system for the changes to take effect.
If contiguous disk space is not available, you will need to create a
new contiguous logical volume for primary swap within the root
volume group, the volume group that contains the root logical
volume. You do not need to designate a specific disk. For example:
lvcreate -C y -L 48 -r n -n pswap /dev/vgroot
After creating a logical volume that will be used as primary swap,
you will need to use lvlnboot (1M):
lvlnboot -s /dev/vgroot/pswap
Reduce primary swap.
If you are using logical volumes, you can do this by reducing the size
or number of logical volumes used for primary swap. If you are not
using logical volumes, you can discontinue the use of a disk section
for primary swap. Reducing primary swap cannot be done
dynamically; you must reboot the system for reduced primary device
swap changes to take effect.