pagingspace – Manage Paging space
Synopsis
This module allows to list, add, change, remove, activate and deactivate paging space(s).
Requirements
The below requirements are needed on the host that executes this module.
AIX
Python >= 3.6
Privileged user with authorizations
Parameters
- action (True, str, None)
Specifies the action to perform.
list
to display the characteristics of a paging space.
create
to add an additional paging space.
modify
to modify a paging space.
remove
to remove a paging space.
activate
to activate a paging space.
deactivate
to deactivate a paging space.- list_all (optional, bool, False)
Used with action==list
When set to true, It specifies that all the paging spaces should be listed
- include_summary (optional, bool, False)
Used with action==list
If set to true, specifies that the summary characteristics of all paging spaces are to be given.
This information consists of the total paging space in megabytes and the percentage of paging space currently assigned (used).
- ps_type (optional, str, None)
Specifies the characteristics of the paging space.
lv
specifies that characteristics of only logical volume paging spaces are to be given.
nfs
specifies that the characteristics of only NFS paging spaces are to be given. In case ofaction == list
, the heading of theoutput will be changed to display the host name of the NFS server and the path name of the file that
resides on the server that is being used for NFS paging.
ps_helper
specifies that a helper program is to be used.- ps_helper_name (optional, str, None)
Specifies the name of paging space helper program that needs to be used.
When
ps_chars == ps_helper
, It is required to provide ps_helper_name- ps_name (optional, str, None)
Specifies the name of the paging space.
- nfs_server_hostname (optional, str, None)
Specifies the NFS server where the ServerFileName resides.
It is required to specify this attribute, in case of ps_type == nfs and action == create
- nfs_server_pathname (optional, str, None)
Specifies the file which will be used for the NFS paging of the system.
It is required to specify this attribute, in case of ps_type == nfs and action == create
This file must exist and be exported correctly to the client that will use the file for paging.
- paging_space_configured_at_sub_restart (optional, bool, False)
Specifies that the paging space is configured at subsequent restarts.
- checksum_size (optional, int, None)
Specifies the size of the checksum to use for the paging space, in bits.
If not specified, by default it takes the value as 0.
- activate_immediately (optional, bool, False)
If set to true, specifies to activate the paging space immediately.
- logical_partitions (optional, int, None)
Specifies the size of the paging space and the logical volume to be made in logical partitions.
If you are trying to create non-nfs paging space, you need to provide this attribute.
- volume_group (optional, str, None)
Specifies the name of the volume group to be used for creating the paging space.
If you are trying to create non-nfs paging space, you need to provide this attribute.
- pv_name (optional, str, None)
Specifies the physical volume of the volume_group on which the logical volume is to be made.
- logical_partitions_add (optional, int, None)
When action == modify, specifies the number of logical partitions to add.
- logical_partitions_substract (optional, int, None)
When action == modify, specifies the number of logical partitions to substract.
- use_ps_at_next_restart (optional, bool, None)
Specifies to use a paging space at the next system restart.
- use_on_next_swapon (optional, bool, False)
Specifies that the checksum_size will be used for the next swapon of the paging space.
This option has no effect if checksum_size is not specified or paging space is not swapped on.
- activate_all_ps (optional, bool, False)
Specifies that all the paging spaces available need to be activated.
- ps_list (optional, list, None)
Specifies the list of paging spaces that need to be activated or deactivated.
Notes
Note
The /etc/swapspaces file specifies the paging spaces and the attributes of the paging spaces.
You can refer to the IBM documentation for additional information on the commands used at https://www.ibm.com/docs/en/aix/7.2?topic=concepts-paging-space-file-commands-options,
For more information on lsps, https://www.ibm.com/docs/en/ssw_aix_72/l_commands/lsps.html
For more information on mkps, https://www.ibm.com/docs/en/ssw_aix_72/m_commands/mkps.html
For more information on chps, https://www.ibm.com/docs/en/ssw_aix_72/c_commands/chps.html
For more information on rmps, https://www.ibm.com/docs/en/ssw_aix_72/r_commands/rmps.html
For more information on swapoff, https://www.ibm.com/docs/en/ssw_aix_72/s_commands/swapoff.html
For more information on swapon, https://www.ibm.com/docs/en/ssw_aix_72/s_commands/swapon.html
Examples
- name: List paging space summary
ibm.power_aix.pagingspace:
action: list
include_summary: true
- name: List all the paging spaces
ibm.power_aix.pagingspace:
action: list
list_all: true
include_summary: true
output_list_format: true
- name: Create a lv paging space
ibm.power_aix.pagingspace:
action: create
activate_immediately: false
ps_type: lv
volume_group: rootvg
logical_partitions: 2
- name: Create nfs paging space
ibm.power_aix.pagingspace:
action: create
activate_immediately: true
ps_type: nfs
nfs_server_hostname: hostname
nfs_server_pathname: pathname
- name: Modify a particular paging space, add lpars and change checksum size
ibm.power_aix.pagingspace:
action: modify
logical_partitions_add: 2
checksum_size: 8
use_on_next_swapon: true
ps_name: paging00
- name: Activate all paging spaces
ibm.power_aix.pagingspace:
action: activate
activate_all_ps: true
- name: Activate a paging space
ibm.power_aix.pagingspace:
action: activate
ps_name: /dev/paging00
- name: Deactivate a paging space
ibm.power_aix.pagingspace:
action: deactivate
ps_name: /dev/paging00
- name: Remove a paging space
ibm.power_aix.pagingspace:
action: remove
ps_name: paging00
Return Values
- msg (always, str, )
The execution message.
- rc (always, int, )
The return code.
- stdout (If the command failed., str, )
The standard output.
- stderr (If the command failed., str, )
The standard error.
- changed (always, bool, )
Tells whether any change occured on the system
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.