alt_disk – Alternate rootvg disk management.¶
Synopsis¶
Copy the rootvg to an alternate disk or cleanup an existing one on a logical partition (LPAR).
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¶
- action (optional, str, copy)
Specifies the operation to perform.
copy
to perform and alternate disk copy.
clean
to cleanup an existing alternate disk copy.- targets (optional, list, None)
Specifies the target disks.
Either targets or disk_size_policy must be specified.
If no targets disk is specified, it will look for a valid candidate disk based on the provided disk_size_policy policy.
- disk_size_policy (optional, str, None)
When action=copy, specifies how to choose the alternate disk if targets is 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.
- bootlist (optional, bool, False)
When action=copy, specifies to run bootlist after the alternate disk copy.
- remain_nim_client (optional, bool, False)
When action=copy, specifies to copy the
/.rhosts
and/etc/niminfo
files to the alternate rootvg.- device_reset (optional, bool, False)
When action=copy, specifies to reset any user-defined device configurations on the target
altinst_rootvg
.- first_boot_script (optional, str, None)
When action=copy, specifies an optional customization script to run during the initial boot of the alternate rootvg, after all file systems are mounted.
- resolvconf (optional, str, None)
When action=copy, specifies the
resolv.conf
file to replace the existing one after the rootvg has been cloned.
Notes¶
Note
alt_disk only backs up mounted file systems. Mount all file systems that you want to back up.
When no target is specified, copy is performed to only one alternate disk even if the rootvg contains multiple disks.
You can refer to the IBM documentation for additional information on the commands used at https://www.ibm.com/support/knowledgecenter/ssw_aix_72/a_commands/alt_disk_copy.html, https://www.ibm.com/support/knowledgecenter/ssw_aix_72/a_commands/alt_rootvg_op.html.
Examples¶
- name: Perform an alternate disk copy of the rootvg to hdisk1
alt_disk:
targets: hdisk1
- name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
alt_disk:
disk_size_policy: minimize
- name: Perform a cleanup of any existing alternate disk copy
alt_disk:
action: clean
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.