nim_vios_alt_disk – Uses NIM to create/cleanup an alternate rootvg disk of VIOS clients.

Synopsis

Performs alternate disk copy and cleanup operations through the Network Installation Management (NIM) copying the root volume group to an alternate disk or cleaning an existing copy.

Requirements

The below requirements are needed on the host that executes this module.

  • AIX >= 7.1 TL3

  • Python >= 2.7

  • Privileged user with authorizations: aix.system.install,aix.system.nim.config.server

Parameters

action (True, str, None)

Specifies the operation to perform on the VIOS.

Specifies the action to perform.

alt_disk_copy to perform and alternate disk copy.

alt_disk_clean to cleanup an existing alternate disk copy.

targets (True, list, None)

Specifies the NIM VIOS clients to perform the action on.

Uses a dictionary format, with the key being the VIOS NIM name and the value being the list of disks used for the alternate disk copy.

When no target disks is specified, the alternate disk copy is performed to only one alternate disk even if the rootvg contains multiple disks.

time_limit (optional, str, None)

Before starting the action, the actual date is compared to this parameter value; if it is greater then the task is stopped.

The valid format is mm/dd/yyyy hh:mm.

disk_size_policy (optional, str, nearest)

Specifies how to choose the alternate disk when not specified.

minimize smallest disk that can be selected.

upper first disk found bigger than the rootvg disk.

lower disk size less than rootvg disk size but big enough to contain the used PPs.

nearest disk size closest to the rootvg disk.

force (optional, bool, False)

Forces removal of any existing alternate disk copy on target disks.

Stops any active rootvg mirroring during the alternate disk copy.

vios_status (optional, dict, None)

Specifies the result of a previous operation.

If set then the vios_status of a target tuple must contain SUCCESS to attempt update.

If no vios_status value is found for a tuple, then returned status for this tuple is set to SKIPPED-NO-PREV-STATUS.

nim_node (optional, dict, None)

Allows to pass along NIM node info from a previous task to another so that it discovers NIM info only one time for all tasks. The current task might update the NIM info it needs.

Notes

Note

Examples

- name: Perform an alternate disk copy of the rootvg to hdisk1 on nimvios01
  nim_vios_alt_disk:
    action: alt_disk_copy
    targets:
    - nimvios01: [hdisk1]

- name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
  nim_vios_alt_disk:
    action: alt_disk_copy
    disk_size_policy: minimize
    targets:
    - nimvios01: []
      nimvios02: []
    - nimvios03: []

- name: Perform a cleanup of any existing alternate disk copy on nimvios01
  nim_vios_alt_disk:
    action: alt_disk_clean
    targets:
    - nimvios01: []

Return Values

msg (always, str, )

Status information.

status (always, dict, { vios1: ‘SUCCESS-ALTDC’, vios2: ‘FAILURE-ALTDC wrong rootvg state on vios2’ })

Status for each VIOS tuples (dictionary key).

<vios> (when vios is actually a NIM client, str, SUCCESS-ALTDC)

Status of the execution on the <vios>.

nim_node (always, dict, {‘nim_node’: {‘vios’: {‘vios1’: {‘Cstate’: ‘ready for a NIM operation’, ‘Cstate_result’: ‘success’, ‘Mstate’: ‘currently running’, ‘cable_type1’: ‘N/A’, ‘class’: ‘management’, ‘connect’: ‘nimsh’, ‘cpuid’: ‘00F600004C00’, ‘if1’: ‘master_net vios1.aus.stglabs.ibm.com 0’, ‘ip’: ‘vios1.aus.stglabs.ibm.com’, ‘mgmt_profile1’: ‘p8-hmc 1 vios-cec’, ‘netboot_kernel’: ‘64’, ‘platform’: ‘chrp’, ‘prev_state’: ‘alt_disk_install operation is being performed’}}}})

NIM node info.

vios (always, dict, )

List of VIOS NIM resources.

meta (always, dict, )

Detailed information on the module execution.

messages (always, list, see below)

Details on errors/warnings not related to a specific target.

<target> (when target is actually a NIM client, dict, )

Detailed information on the execution on the target.

messages (always, list, )

Details on errors/warnings

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • AIX Development Team (@pbfinley1911)