Skip to content

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

Open
@iscb1962

Description

@iscb1962

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions