[linux-lvm] Possible Bug vgrename
Alasdair G Kergon
agk at redhat.com
Mon Jun 21 20:00:00 UTC 2021
On Mon, Jun 21, 2021 at 02:48:23PM -0500, David Teigland wrote:
> On Mon, Jun 21, 2021 at 11:32:12AM -0700, N wrote:
> > Is there a way to temporarily rename (without actually renaming) the volume
> > groups (i.e. like setting a mask for the volume group names), or is there a
> > way to force vgrename to actually make the change even if there is an
> > existing conflict (preferably without a reboot)?
> You can set a device filter the vgrename command so it only sees the
> devices with the VG you want to change, and won't see devices with the
> duplicate name.
> vgrename --config 'devices/filter=["a|/dev/...|", "r|.|"]' vg1 vg2
And look at how the 'vgimportclone' shell script uses filters and
other techniques to set up a segregated environment in which to
modify a VG that isn't being used on the machine.
As extra protection sometimes, you can also tell a command not to talk to
the kernel dm subsystem by using '--driverloaded n'.
More information about the linux-lvm