Making the hd6 paging space smaller

The following procedure uses the chps command to shrink existing paging spaces, including the primary paging space and the primary and secondary dump device.

The chps command calls the shrinkps script, which safely shrinks the paging space without leaving the system in an unbootable state. Specifically, the script does the following:
  1. Creates a temporary paging space in the same volume
  2. Moves information to that temporary space
  3. Creates a new, smaller paging space in the same volume
  4. Removes the old paging space

For the chps command to complete successfully, enough free disk space (space not allocated to any logical volume) must exist to create a temporary paging space. The size of the temporary paging space is equal to amount of space needed to hold all the paged out pages in the old paging space. The minimum size for a primary paging space is 32 MB. The minimum size for any other paging space is 16 MB.

Note: If the following procedure encounters an I/O error, the system might require immediate shutdown and rebooting.
  1. Check your logical volume and file system distribution across physical volumes by typing the following command:
    lspv -l hdiskX
    Where hdiskX is the name of your physical volume.
  2. To shrink the paging space size, type the following on the command line:
    smit chps
Note: The primary paging space is hardcoded in the boot record. Therefore, the primary paging space will always be activated when the system is restarted. The chps command cannot deactivate the primary paging space.

Priority is given to maintaining an operational configuration. System checks can lead to immediate refusal to shrink the paging space. Errors occurring while the temporary paging space is being created cause the procedure to exit, and the system will revert to the original settings. Other problems are likely to provoke situations that will require intervention by the system administrator or possibly an immediate reboot. Some errors may prevent removal of the temporary paging space. This would normally require non-urgent attention from the administrator.

Attention: If an I/O error is detected on system backing pages or user backing pages by the swapoff command within the shrinkps script, an immediate shutdown is advised to avoid a possible system crash. At reboot, the temporary paging space is active and an attempt can be made to stop and restart the applications which encountered the I/O errors. If the attempt is successful and the swapoff command is able to complete deactivation, the shrink procedure can be completed manually using the mkps, swapoff and rmps commands to create a paging space with the required size and to remove the temporary paging space.

Do not attempt to remove (using rmps) or reactivate (using chps) a deactivated paging space that was in the I/O ERROR state before the system restart. There is a risk that the disk space will be reused and may cause additional problems.