Trying to move a VG from one VM to another with the data intact
by waninick from LinuxQuestions.org on (#5JDF3)
I have a virtual RHEL 6 machine with a volume group (vg01) that spans two vdisks. The 4 logical volumes that I want to move are on those vdisks.
The receiving VM is a RHEL 8 with a single volume group (vg00) and several logical volumes for the standard OS disk layout.
I have gone through the process detailed below:
umount all 4 mount points
vgchange -an vg01
vgexport vg01
shutdown losing system
removed the 2 vdisks from the vm
attached the 2 vdisks to the RHEL 8 vm
ls /sys/class/scsi_host | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan; done
pvs
vgimport vg01
vgs
vgchange -ay vg01
At this point, I ran into issues with duplicate UUIDs that caused the attachment to fail. I tried to reverse the process and re-attach the vdisks back to the RHEL 6 machine, but now that VM won't start due to file locking issues. Quite the mess.
I guess I was wondering if the process I had gleaned from research was not correct for moving a VG that spanned more that one vdisk.
I will save the vm-not-starting issue for another forum.
In any case, ideas would be welcome. Currently this is within our test environment, but will need to use something similar in the production environment soon.
Thanks in advance for any feedback.
TimG


The receiving VM is a RHEL 8 with a single volume group (vg00) and several logical volumes for the standard OS disk layout.
I have gone through the process detailed below:
umount all 4 mount points
vgchange -an vg01
vgexport vg01
shutdown losing system
removed the 2 vdisks from the vm
attached the 2 vdisks to the RHEL 8 vm
ls /sys/class/scsi_host | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan; done
pvs
vgimport vg01
vgs
vgchange -ay vg01
At this point, I ran into issues with duplicate UUIDs that caused the attachment to fail. I tried to reverse the process and re-attach the vdisks back to the RHEL 6 machine, but now that VM won't start due to file locking issues. Quite the mess.
I guess I was wondering if the process I had gleaned from research was not correct for moving a VG that spanned more that one vdisk.
I will save the vm-not-starting issue for another forum.
In any case, ideas would be welcome. Currently this is within our test environment, but will need to use something similar in the production environment soon.
Thanks in advance for any feedback.
TimG