migrate root fs to lvm

Latest response

hi There,

rhel6 was built on standard disk partition instead of lvm and when we are trying to migrate we are facing issues.

We have migrated to new lvm disk and able to boot with two boot envs if two disks are attached, but when we detach old disk we are not able to boot the server.Can you please help us on this?
Our server was built on VMWARE 5.x version

Responses

Hi Pullaiah Gavvala,

You said "but when we detach old disk we are not able to boot ", could you explain more? What is the error message that you get along with screen image?

Here, I assume that when you say "standard disk partition", it is just plain disk partitions as /dev/sda1,, on which you had installed RHEL6, so this would at least include /boot, / (root) , and swap, is this what you mean?

How was the system data moved from standard disk partition setup to a file system built on lvm layout? Did you use command like "dd" to mirror data?

Have you followed all necessary steps to build the new boot device ? Because, you would need to ..... change boot device map in the file /boot/grub/device.map, install grub on the new device, make sure you got the correct device in /boot/grub/grub.cfg file, edit /etc/fstab to remove and add new entry of the new boot device etc., Please reply with the details..

Thanks for the response. I have created an lvm for root disk and copied the all the data with cp.

I have figured out the issue, the issue was in device map file I missed to add the new disk. I have added the new disk in /boot/grub/device.map file and rebuild the grup, it worked.

Nice to hear that you fixed the issue.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.