mkps Command

Purpose

Adds an additional paging space.

Syntax

To Add a Logical Volume for Additional Paging Space

mkps [ -t lv | [ps_helper psname] ] [ -a ] [ -n ] [-c ChksumSize]-s LogicalPartitions VolumeGroup [ PhysicalVolume ]

To Add Additional Paging Space On an NFS Server

mkps [ -a ] [ -n ] -t nfs ServerHostName ServerFileName

Description

The mkps command adds an additional paging space. Before the paging space can be used it must be activated, using the swapon command. The VolumeGroup parameter specifies the volume group within which the logical volume for the paging space is to be made. The PhysicalVolume parameter specifies the physical volume of the VolumeGroup on which the logical volume is to be made.

Note: A paging space larger than 2 GB is possible when using NFS (Network File System) v4 rather than the default UDP (User Datagram Protocol) or the NFSv2 protocol. NFSv2 swapping can only handle swap file size up to 2 GB due to NFSv2 protocol limitation.

In the second form of the mkps command, the ServerHostName parameter specifies the NFS server where the ServerFileName resides. The ServerFileName specifies the file which will be used for the NFS paging of the system. The ServerFileName file must exist and be exported correctly to the client that will use the file for paging.

When adding a NFS paging space, the client attempts to contact the server using UDP and then TCP. The method that succeeds first is used to contact the server when accessing that paging space.

If the -t flag is specified, the argument will be assumed to be a third-party helper executable. If the helper executable is present in the /sbin/helpers/pagespace path then it will be spawned passing all the arguments and with the -m flag to specify mkps command. An entry will be added into /etc/swapspaces path if the helper executable returns zero. In this case, if psname starts with /, it is considered to be absolute path of device entry , or else /dev is prepended to the psname. The helper executable must take care of creating the device, making it pageable and adding an entry into ODM. If the helper program doesn’t exist in the /sbin/helpers/pagespace directory the mkps command will display the usage error. The helper executable must exit with a 0 if successful and a non-zero if it fails.

You can use the File Systems application in Web-based System Manager (wsm) to change file system characteristics. You could also use the System Management Interface.

Flags

Item Description
-a Specifies that the paging space is configured at subsequent restarts.
-c Specifies the size of the checksum to use for the paging space, in bits. Valid options are 0 (checksum disabled), 8, 16 and 32. If -c is not specified it will default to 0.
-n Activates the paging space immediately.
-s LogicalPartitions Specifies the size of the paging space and the logical volume to be made in logical partitions.
-t Specifies the type of paging space to be created. One of the following variables is required:
lv
Specifies that a paging space of type logical volume should be created on the system.
nfs
Specifies that a paging space of type NFS should be created on the system.
ps_helper
Name of the helper program for a third party device.
psname
Name of the device entry for paging space.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX® Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To create a paging space in volume group myvg that has four logical partitions and is activated immediately and at all subsequent system restarts, enter:

    mkps  -a  -n  -s4 myvg

  2. To create an NFS paging space on the NFS server swapserve where the host swapserve has the /export/swap/swapclient file exported, enter:
    mkps -t nfs swapserve /export/swap/swapclient
  3. To create a paging space myps using helper executable foo:
    mkps -t foo /dev/myps -s1 myvg mydisk

Files

Item Description
/etc/swapspaces Specifies the paging space devices and their attributes.