Discussion:
[linux-lvm] duplicate pv change uuid
Xen
2017-01-06 18:55:53 UTC
Permalink
I want to ask again,

How can I change the UUID of a duplicated PV?

I mirrored a partition to another disk and tried to change its UUID with
pvchange -u.

But I think LVM had already decided to replace the reference to the PV
(partition) on the old disk by the reference to the new disk, or
something.

For some reason it always prefers the wrong one.

Now I booted with just one disk but I cannot change the UUID of the
running system, but if I connect the other disk I am afraid I won't be
able to change it also.

How does one do this, again?
David Teigland
2017-01-06 19:04:32 UTC
Permalink
Post by Xen
I want to ask again,
How can I change the UUID of a duplicated PV?
I mirrored a partition to another disk and tried to change its UUID with
pvchange -u.
But I think LVM had already decided to replace the reference to the PV
(partition) on the old disk by the reference to the new disk, or something.
For some reason it always prefers the wrong one.
Now I booted with just one disk but I cannot change the UUID of the running
system, but if I connect the other disk I am afraid I won't be able to
change it also.
How does one do this, again?
vgimportclone is meant to do this. It strategically uses filters to
isolate and modify the intended devs.
Xen
2017-01-06 19:19:43 UTC
Permalink
Post by David Teigland
Post by Xen
How does one do this, again?
vgimportclone is meant to do this. It strategically uses filters to
isolate and modify the intended devs.
Thanks.

I thought running it in the current situation would be enough.

For some reason I am not getting my own emails though. Basically I am
not getting list emails, only direct replies atm.

So I will CC myself I guess.


Found duplicate PV 3U9ac3Ah5lcZUf03Iwm0cgMMaKxdflg0: using /dev/sdb4
not /dev/sdc4
Using duplicate PV /dev/sdb4 without holders, replacing /dev/sdc4
Volume group containing /dev/sdb4 has active logical volumes
Physical volume /dev/sdb4 not changed
0 physical volumes changed / 1 physical volume not changed

This was after running vgimportclone /dev/sdc4

It immediately replaces the one I target with the one I am using, (don't
need to change, don't need) and then says it's active, duh.

I guess I'll just need to reboot a live DVD or actually OpenSUSE DVDs
are faster.

Loading...