WipeOut spake the following on 4/3/2007 8:23 AM:
Ross S. W. Walker wrote:
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of WipeOut Sent: Tuesday, April 03, 2007 6:40 AM To: CentOS mailing list Subject: [CentOS] Where is the LVM config stored?
Hi,
I am trying to migrate one of my systems to a VMware virtual machine.. The PC is an IDE drive using LVM and the virtual machine is a SCSI drive using ordinary partitions..
Basically I rsynced the entire filesystem from the physical to the virtual machine and that seemed to work just fine.. I installed grub onto the drive in the virtual machine and its booting fine..
What tool did you use to copy the host filesystem?
To what physical medium did you copy it to, vmware virtual disk file or physical partition/logical volume?
The problem comes when the new system trys to scan for the LVM setup that was on the previous PC.. I thought it would scan the drive, and seen that there are no LVM partitions and move on but it doesn't it has a kernel panic and flashes the cap lock and scroll lock LED's on the keyboard.. Obviously somewhere its being told there should be an LVM partition or its being told to scan hda rather than sda..
The LVM information is stored in the disk volume itself, there are backup copies of the configuration routinely dumped to /etc/lvm/backup, and archive copies of volume groups stored in /etc/lvm/archive.
Make sure this "copy" of your physical host's drive isn't somehow being accessed by the physical host at the same time as the virtual host.
I have checked the grub.conf and fstab files and they are all right for the new drive setup..
So where is the LVM config? How do I tell it there are now LVM volumes that need to be accessed?
If the PV headers were copied in the volume copy it should pick those up on the pvscan, then vgscan will see any volume groups defined within the PVs and lvscan should find any LVs within the volume groups.
-Ross
Maybe I should explain exactly what I did because perhaps I am doing it all wrong and thats why I am having so many issues..
I have a Physical Centos box (we will call it PC) and I want to turn it into a Virtual Centos box (VC).. I created the virtual machine in the VMWare server console and then installed VC with a minimum Centos4 install.. I then went to PC and ran rsync with the various switches to copy the entire filesystem from PC to VC across the network.. I excluded /dev, /proc and /sys.. I also used the --delete option to remove any files that exited on VC that were no longer on PC.. Then before rebooting VC I checked fstab and grub.conf files to make sure they were correct.. Finally I restarted VC and booted from CD1 in rescue mode to run grub-install to get the boot sector and start up working right..Then rebooted VC.. It starts up and then freaks when trying to sort out the LVM volumes..
The difference between PC and VC is that in VC I have decided to use a scsi drive (apparently better performance) and in PC its an IDE and I have made the virtual drive bigger.. I have tried running PC with and without LVM (in other words using normal formatted partitions) and it seems to have the same problem.. So even when no LVM volumes exist its still looking for them..
Obviously I have both systems live an running when I am doing the data transfer.. There are no errors but would this cause a major issue?
How do you migrate form physical to virtual?
Thanks..
Going from an IDE drive to a SCSI drive means you will have to make an initial ramdisk on the new system (initrd). The scsi drivers are modules in the kernel, and without an initrd with the drivers included and enabled, you can't mount the root to finish booting. Look here for a fix; http://kbase.redhat.com/faq/FAQ_80_3902.shtm
I don't see how an emulated scsi drive will perform any better than an emulated IDE drive, but I suppose it is possible.