Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to remove a varied off VG #432

Closed
BladesOfSteele opened this issue Mar 26, 2024 · 6 comments
Closed

Failed to remove a varied off VG #432

BladesOfSteele opened this issue Mar 26, 2024 · 6 comments
Assignees

Comments

@BladesOfSteele
Copy link

Describe the bug
When trying to remove an existing, non-varied on altinst_rootvg, the process fails:
FAILED! => {"changed": false, "cmd": "lsvg", "msg": "Volume group altinst_rootvg is deactivated. Unable to reduce volume group.", "rc": 0, "stderr": "", "stderr_lines": [], "stdout": "rootvg\naltinst_rootvg\n", "stdout_lines": ["rootvg", "altinst_rootvg"]}

To Reproduce
Steps to reproduce the behavior:
When running task that removes a non-varied on VG
- name: delete any pre-existing altinst_rootvg
ibm.power_aix.lvg:
vg_name: altinst_rootvg
state: absent

Expected behavior
Would expect the process to run a reducevg and a chpv -C hdisk#

Environment (please complete the following information):

  • OS: VIO 3.1
  • AIX Collection Version: 1.8.1

Additional context
This would be something I'd expect comes up, when people are using viosupgrade to upgrade VIO servers from v3 to v4, as in my case. It should allow for an easy clean up of any previous failed or aborted attempts before running. To that note, if all you do is run reducvevg on an existing altinst_rootvg, the upgrade fails, since the disk still looks used, hence the requirement for chpv -C hdisk#.

@BladesOfSteele
Copy link
Author

If I do try to varyon the VG using state=varyon and then try to delete the VG with the delete_lvs=true, I get:
0516-304 getlvodm: Unable to find device id *****

without the delete_lvs, it fails with 0516-016 ldeletepv: Cannot delete physical volume with allocated partitions.

@schamola
Copy link
Contributor

schamola commented May 2, 2024

Hi @BladesOfSteele
This is the expected behaviour of AIX. The volume group must be in activated stated (varied on) if you want to reduce it.
Furthermore, If the VG is in activated state but reducevg is still not working (i.e. this error is coming - 0516-016 ldeletepv: Cannot delete physical volume with allocated partitions)... You need to set delete_lvs attribute to true.

Setting delete_lvs attribute to true will deallocate existing logical volume partitions and then delete the resultant empty logical volumes from the specified physical volumes.

@BladesOfSteele
Copy link
Author

And therein lies the catch-22 situation. In this scenario, you cannot vary on the VG. That fails with:
0516-082 varyonvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.

@schamola
Copy link
Contributor

Hi @BladesOfSteele
It seems that there is Inconsistency between the VGDA on disk and the ODM in your environment.

Have a look at this:

https://www.ibm.com/support/pages/0516-082-varyonvg-unable-access-special-device-file-execute-redefinevg-and-synclvodm-build-correct-environment

@nitismis
Copy link
Member

This seems to be a limitation from AIX itself and not with the collection. Please follow the link above and provided workaround there. That will fix the issue.

@BladesOfSteele
Copy link
Author

Running redefinevg -d did clear the issue. Worth considering running as part of the collection as part of the varyon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants