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.

install to install filesets, fixes in existing alternate disk.

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.

existing_altinst_rootvg (optional, str, None)

When action=install, specifies the bundle_name or fixes or filesets to be installed in alt_rootvg

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.

bundle_name (optional, str, None)

Path name of optional file with a list of packages or filesets that will be installed after a rootvg clone. If specified then image_location must be provided.

apar_fixes (optional, str, None)

Optional file with a list of APARs to install after a clone of rootvg. If apar_fixes is provided then image_location must be provided.

filesets (optional, str, None)

List of filesets to install after cloning a rootvg. If specified then image_location must be provided.

installp_flags (optional, str, None)

The flags to use when updating or installing new filesets into the cloned altinst_rootvg. If specified then image_location must be provided.

image_location (optional, str, None)

Location of installp images or updates to apply after a clone of rootvg. This can be a directory full path name or device name.

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.

allow_old_rootvg (optional, bool, False)

Allows the removal or cleanup of existing old rootvg as well.

Notes

Note

  • ERROR while parsing: While parsing “M(alt_disk)” at index 1: Module name “alt_disk” is not a FQCN 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.

  • For action=copy, If disk_size_policy is provided and the rootvg has been mirrored onto two disks without -c 3 flag, two disks of size similar to total_rootvg_size/2 will be selected. If you want three disks to be selected, either mention the disks in the targets or use -c 3 flag while mirroring the rootvg.

  • If rootvg contains a LV having two or three copies, the module will assume that the rootvg is mirrored, and accordingly the disks will be selected in case of action=copy, when disk_size_policy has been provided.

Examples

- name: Perform an alternate disk copy of the rootvg to hdisk1
  alt_disk:
    action: copy
    targets: hdisk1

- name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
  alt_disk:
    action: copy
    disk_size_policy: minimize

- name: Perform a cleanup of any existing alternate disk copy
  alt_disk:
    action: clean

- name: Perform a cleanup of any existing alternate disk copy and old rootvg
  alt_disk:
    action: clean
    allow_old_rootvg: yes

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.

Status

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

  • This module is maintained by community.

Authors

  • AIX Development Team (@pbfinley1911)