[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System Management Guide: Operating System and Devices

Resizing or Moving the hd6 Paging Space

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. For a discussion of recommended sizes of paging spaces, see "Placement and Sizes of Paging Spaces" in AIX Versions 3.2 and 4 Performance Tuning Guide.

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, which 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 should significantly improve 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) would likely contain fewer logical partitions belonging to the busiest file systems.

You can check your logical volume and file system distribution across physical volumes by using the following command:

lspv -l hdiskX
Note: The steps in the following procedures are all necessary, even those not directly related to the hd6 paging space. The additional steps are needed because a paging space cannot be deactivated while the system is running.

Prerequisites

Be sure to read the following articles before attempting to move a paging space to a different disk:

Making the hd6 Paging Space Smaller

Notes:
  1. If you decide to reduce hd6, you must leave enough space for the software in rootvg. A rule of thumb for reducing hd6 paging space is to leave enough space to match physical memory. To find out the amount of physical memory, use the following command:
    lsattr -E -l sys0 -a realmem
  2. AIX Version 4.2.1 and later does not support reducing the size of hd6 below 32MB or the system will not boot.

This procedure assumes that hd6 is on rootvg, which is located on hdisk0. Create a temporary paging space for this procedure on rootvg as follows:

mkps -a -n -s 20 rootvg

This command outputs the name of the paging space (paging00 if no others exist).

  1. Use the following command to deactivate the hd6 paging spaces in preparation for the reboot later in the procedure:
    chps -a n hd6
  2. Change the paging space entry in the /sbin/rc.boot file from:
    swapon /dev/hd6
    to
    swapon /dev/paging00
  3. Change the primary dump device designation to be the paging space paging00.
    sysdumpdev -P -p /dev/paging00
  4. Create a bootable image with the bosboot command for a hard disk image:
    bosboot -d /dev/hdisk0 -a
  5. Put the system key (if present) in the Normal position and use the following command, which will both shut down the operating system and reboot it:
    shutdown -r
  6. Remove the hd6 paging space:
    rmps hd6
  7. Create a new logical volume of the size you want for the hd6 paging space:
    mklv -t paging -y hd6 rootvg 10
  8. Change the primary dump device designation back to be the paging space hd6.
    sysdumpdev -P -p /dev/hd6
  9. Change the paging space entry in the /sbin/rc.boot file from:
    swapon /dev/paging00
    to
    swapon /dev/hd6
  10. Create a bootable image with the bosboot command for a hard disk image:
    bosboot -d /dev/hdisk0 -a
  11. Make the hd6 paging space available to the system:
    swapon /dev/hd6
  12. Change the temporary paging space, paging00, so that it does not automatically activate at reboot time:
    chps -a n paging00
  13. Put the system key (if present) in the Normal position and use the following command, which will both shut down the operating system and reboot it:
    shutdown -r
  14. Remove the temporary paging space:
    rmps paging00

Moving the hd6 Paging Space within the Same Volume Group

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 will be 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").

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 as in the other procedure in this article.

Use the following command to move the default (hd6) paging space from hdisk0 to hdisk2:

migratepv -l hd6 hdisk0 hdisk2 

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]