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

Switch from physical volume without unless_vg to with, using same disc fails - not sure if this should be a bug .... #350

Open
iscb1962 opened this issue Sep 20, 2024 · 0 comments

Comments

@iscb1962
Copy link

Use Case

We've recently upgraded the LVM module to get access to the unless_vg setting for physical volumes within hieradata.
Formerly the hieradata would have been
physical_volumes:
- /dev/sdb
Is changed to
physical_volumes:
/dev/sdb:
unless_vg: 'local_vg'
This then fails during a puppet run with messages like

Error: Could not remove physical volume /dev/sdb from volume group 'local_vg'; this physical volume may be in use and may require a manual data migration (using pvmove) before it can be removed (Execution of '/sbin/vgreduce local_vg /dev/sdb' returned 5: Physical volume "/dev/sdb" still in use)
Error: /Stage[main]/Lvm/Lvm::Volume_group[local_vg]/Volume_group[local_vg]/physical_volumes: change from ['/dev/sdb'] to [
{
'/dev/sdb' => {
'unless_vg' => 'local_vg'
}
}] failed: Could not remove physical volume /dev/sdb from volume group 'local_vg'; this physical volume may be in use and may require a manual data migration (using pvmove) before it can be removed (Execution of '/sbin/vgreduce local_vg /dev/sdb' returned 5: Physical volume "/dev/sdb" still in use)

Describe the Solution You Would Like

Since the physical device itself is not changed puppet should not be failing.

Describe Alternatives You've Considered

None - I can't of a workaround.

Additional Context

Its impossible to add the unless_vg option to existing configurations - which we were hoping to use to workaround the issue of disc names changing in RHEL/Rocky 9.4

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

1 participant