This article discusses various ways to modify the hd6 paging space. The following procedures describe how to make the hd6 paging space smaller and how to move the hd6 paging space within the same volume group.
System managers and users sometimes want to reduce the default paging space in order to:
Moving hd6 to a different disk is another way to enhance storage system performance. Whether moving the paging space or reducing its size, the rationale is the same: move paging space activity to disks that are less busy. The installation default creates a paging logical volume (hd6) on drive hdisk0, that contains part or all of the busy / (root) and /usr file systems. If the minimum Inter Allocation policy is chosen, meaning that all of / and a large amount of /usr are on hdisk0, moving the paging space to a disk that is less busy significantly improves performance. Even if the maximum Inter Allocation policy is implemented and both / and /usr are distributed across multiple physical volumes, your hdisk2 (assuming three disks) likely contains fewer logical partitions belonging to the busiest file systems.
You can check your logical volume and file system distribution across physical volumes by typing the following command:
lspv -l hdiskX
Be sure to read the following articles before attempting to move a paging space to a different disk:
The chps command provides a method for shrinking existing paging spaces, including the primary paging space and the primary and secondary dump device. Use this command by typing either chps PagingSpace or smit chps. The chps command involkes the shrinkps script. This script safely shrinks the paging space without leaving the system in an unbootable state.
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. chps is unable to deactivate the primary paging space.
The shrinkps script safely automates the process for reducing the size of a paging space. The shrinkps script:
Note: For this command to work, there must be enough free disk space (space not allocated to any logical volume) 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.
Priority is given to maintaining an operational configuration. System checks can lead to immediate refusal to shrink the paging space. Errors occuring while the temporary paging space is being created, will exit the procedure and the system will revert to the original settings. Other problems are likely to provoke situations which 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.
If an I/O error is detected on system backing pages or user backing pages by the swapoff command, 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.
Note: Do not attempt to remove (using rmps) or reactivate (using chps) a deactivated paging space which 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.
Moving the default paging space from hdisk0 to a different disk within the same volume group is a fairly simple procedure because you do not have to shut down and reboot.
Type the following command to move the default (hd6) paging space from hdisk0 to hdisk2:
migratepv -l hd6 hdisk0 hdisk2
Note: Moving a paging space with the name hd6 from rootvg to another volume group is not recommended because the name is hard-coded in several places, including the second phase of the boot process and the process that accesses the root volume group when booting from removable media. Only the paging spaces in rootvg are active during the second phase of the boot process, and having no paging space in rootvg could severely affect system boot performance. If you want the majority of paging space on other volume groups, it is better to make hd6 as small as possible (the same size as physical memory) and then create larger paging spaces on other volume groups (see Adding and Activating a Paging Space ).