LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cloning and VG UUIDs change (https://www.linuxquestions.org/questions/linux-server-73/cloning-and-vg-uuids-change-4175485450/)

canopus69 11-21-2013 08:10 PM

Cloning and VG UUIDs change
 
When we clone Redhat VMs we end up getting same uuid for VG, PV and LVs across all cloned VMs.

Is it important to change the UUIDs and how do we change them ?

andrewthomas 11-21-2013 10:36 PM

Code:

blkid
uuidgen
this will generate a random UUID
sudo tune2fs /dev/sdX? -U new_uuid_string


canopus69 11-21-2013 11:24 PM

Quote:

Originally Posted by andrewthomas (Post 5068713)
Code:

blkid
uuidgen
this will generate a random UUID
sudo tune2fs /dev/sdX? -U new_uuid_string


Thanks it worked for LVs and /boot.

Is there any way to change root volume group uuid and boot disk uuid ?

syg00 11-21-2013 11:29 PM

"man vgchange"

canopus69 11-22-2013 12:02 AM

Quote:

Originally Posted by syg00 (Post 5068726)
"man vgchange"

Problem with that is, it doesn't help to change root vg which is always online unless the system is down or in some sort of boot mode.

andrewthomas 11-22-2013 12:03 AM

Quote:

Originally Posted by canopus69 (Post 5068725)
Thanks it worked for LVs and /boot.

You're welcome. Glad to be of help.

canopus69 11-27-2013 06:55 PM

I finally worked out the solution using rescue method. It is for Redhat VM.

Connect OS DVD file in vCenter CDROM icon.
Upon boot press F2 to go into Virtual BIOS Setup.
Change order to boot from DVD drive. Save and exit.
In new screen select
“Rescue installed system.”
Then “English”
Then “us”
Then “Local cd/dvd”
Then “Networking” -> No
Then “Rescue”  Skip
Then “shell Start shell”.
Now at Command line
vgchange –uuid vg00
vgchange –uuid /dev/sda2
reboot
Press [F2] and put back the old boot order in Bios. Save and exit.
Disconnect OS-DVD-file from vCenter.
That is all.

voleg 11-28-2013 10:21 AM

Check this HOWTO LUNs on Linux using native tools
Close to end of blog, there are about cloning.


All times are GMT -5. The time now is 12:35 AM.