Discussion:
[linux-lvm] separate vg create, or merge?
Xen
2016-05-21 15:38:49 UTC
Permalink
If I can ask.

Can you separately create two PVs, put a VG to them, and fill them with
LVs, when these VGs would have the same name, and then at some later
point, in that sense, you would combine them?

I guess in practice if that happens you would have the ability to just
use vgextend.

But what if you allowed two pre-existing PVs/VGs when the VGs had the
same name, in the same system? I believe it wouldn't work very well?

Currently I just gave them different names and plan on merging them.

Regards.
Zdenek Kabelac
2016-05-23 08:33:11 UTC
Permalink
Post by Xen
If I can ask.
Can you separately create two PVs, put a VG to them, and fill them with LVs,
when these VGs would have the same name, and then at some later point, in that
sense, you would combine them?
I guess in practice if that happens you would have the ability to just use
vgextend.
But what if you allowed two pre-existing PVs/VGs when the VGs had the same
name, in the same system? I believe it wouldn't work very well?
Currently I just gave them different names and plan on merging them.
Hi

Not sure what's your concern this time - however are not allowed to 'create'
same VG for 2nd. time in running system (vgname is name of lock)

If you happen to do a 'dd' copy - lvm2 will loudly announce duplicate
device and will either stop processing and tell user which device it has
selected to use.

If you insist on having same 'VG' in one system - you have to use 'filter'
to select which devices individual commands may use (typically you have
a 'Host' system with number of 'Guesses' and you want to 'sneak view' what's
in the guest disk - so you run 'lvm2' command with filter to only see a single
disk.


vgsplit & vgmerge have their validation.

vgrename allows you to rename VG if they have same name but different UUID.

and finaly -

use 'vgimportclone' utility when you do a PV device duplication...


Regards

Zdenek

Continue reading on narkive:
Loading...