Category Archives: lvm

Import and rename duplicated volume group

If you like to use a cloned volume with a volume group on it, then normally you will have a problem with the VG UUID and the VG Name. The good answer there is a nice solution for the problem and you can import and rename duplicated volume groups.

To rename and generate a new UUID for the volume group on the volume use the program vgimportclone.

sudo gimportclone -n old /dev/sdb1
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
WARNING: Activation disabled. No device-mapper interaction will be attempted.
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
Physical volume "/tmp/snap.cozRdFdC/vgimport0" changed
1 physical volume changed / 0 physical volumes not changed
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
WARNING: Activation disabled. No device-mapper interaction will be attempted.
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
Volume group "system" successfully changed
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
Volume group "system" successfully renamed to "old"
Reading all physical volumes. This may take a while...
Found volume group "system" using metadata type lvm2

After the successfully rename of the volume group activate it.

sudo vgchange -a y

Now you can use the renamed volume group old normally as other volume groups.