nim_select_target_disk – verify/autoselect a disk used for alternate disk migration role.
Synopsis
Verify validity of user specified disk or automatically select a valid disk based on disk size policy.
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.lvm.manage.change
Parameters
- nim_client (True, str, None)
Specifies which NIM client LPAR to select target disks from.
- target_disk (optional, str, None)
Specifies which physical volume in nim_client to verify if it is available.
- target_disk_policy (optional, str, None)
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.if
upper
orlower
cannot be satisfied, it will default tominimize
.if an alternate disk copy exists, then this module will fail regardless of the policy selected.
if force parameter is used while an alternate disk copy exists, then it will clean up the disk.
- force (optional, bool, False)
Forces removal of any existing alternate disk copy on target disks for target_disk_policy.
Removes target_disk from an online volume group.
Examples
- name: validate hdisk1 for availability and size
ibm.power_aix.internal.nimadm_select_target_disk:
nim_client: aix1
target_disk: hdisk1
- name: validate hdisk1 for availability and size and
cleanup disk if needed
ibm.power_aix.internal.nimadm_select_target_disk:
nim_client: aix1
target_disk: hdisk1
force: true
- name: automatically select valid disks for altinst_rootvg
installation based on policy
ibm.power_aix.internal.nimadm_select_target_disk:
nim_client: aix1
target_disk_policy: minimize
- name: select physical volume where an existing altinst_rootvg
resides and clean it up to be used to alt disk migration
ibm.power_aix.internal.nimadm_select_target_disk:
nim_client: aix1
target_disk_policy: minimize
force: true
Return Values
- msg (always, str, alt disk copy operation completed successfully)
The execution message.
- stdout (always, str, Bootlist is set to the boot disk: hdisk0 blv=hd5)
The standard output.
- stderr (always, str, )
The standard error.
- target_disk (always, str, hdisk1)
The selected target disk used for alternate disk migration
- valid (always, bool, True)
Determines if the selected target disk is valid. Which means it is both available and has enough space for used physical partitions of rootvg
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.