IBM / ansible-power-aix

Developer contributions for Ansible Automation on Power
https://ibm.github.io/ansible-power-aix/
GNU General Public License v3.0
80 stars 92 forks source link

Enhancement to handle mirrored rootvg in case of alt_disk_copy #409

Closed schamola closed 5 months ago

schamola commented 5 months ago

Fix for issue #354

nitismis commented 5 months ago

@neikei , Can you please confirm this is working fine in your environment ?

neikei commented 5 months ago

@nitismis, many thanks for the development! Our test in the mirrored environment worked. 🚀

# Copy with policy minimize
  - name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
    ibm.power_aix.alt_disk:
      action: copy
      disk_size_policy: minimize

# Minimize found the correct disks and created a mirrored copy
    root 27590924 28311888   0 07:14:57  pts/2  0:00 /usr/bin/ksh /usr/sbin/alt_disk_copy -d hdisk4 hdisk14 -B

# Copy with policy nearest
  - name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
    ibm.power_aix.alt_disk:
      action: copy
      disk_size_policy: nearest

# Nearest found the correct disks and created a mirrored copy
    root 27001182 20185398   7 07:34:11  pts/2  0:00 /usr/bin/ksh /usr/sbin/alt_disk_copy -d hdisk4 hdisk14 -B

The bootlist also looks good, so the "-B" is handled as expected. 👍

# Same as nearest but with bootlist
  - name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
    ibm.power_aix.alt_disk:
      action: copy
      disk_size_policy: nearest
      bootlist: true

# Focused on bootlist and the "-B" flag is removed as expected
    root 25952718 15073726   0 07:39:03  pts/2  0:00 /usr/bin/ksh /usr/sbin/alt_disk_copy -d hdisk4 hdisk14
schamola commented 5 months ago

@neikei Thanks for letting us know ! We will merge the code and make the new release available soon.