I would like to migrate my centos 6.8 installation from one 250gb disk to a newer 500gb one.
Since it's using LVM, I'm reading that moving data should be easy as adding the new disk to the same volume group, then moving all away from the old disk via vgreduce just before physically removing the old disk.
The problem is that apart from LVM, the setup also presents a /boot standard partition as /dev/sda1 and I'm having difficulties understanding how to proceed for the consequent bootup. I've tried the whole procedure on the following setup (via a virtualbox installation used as testdrive):
/dev/sda1 = 512mb boot ext4 on old 250gb disk /dev/sda2 = LVM root on old 250gb disk /dev/sdb1 = 512mb boot ext4 on new 500gb disk /dev/sdb2 = LVM root on new 500gb disk
then from the live centos system I have:
- prepared /dev/sdb with the same /dev/sda structure (512mb as ext4 for boot and then remaining space for LVM)
- done all the pvcreate, vgextend, pvmove and vgreduce stuff regarding LVM
- copied the old /boot contents to the new-to-be boot (after mounting it as /tmp/boot and rsyncing)
- edited the /etc/fstab line for boot stating the correct UUID of /dev/sdb1
- launched "grub-install /dev/sdb" (which required the --recheck flag to complete)
but obtained only a miserable "hard disk failure" message instead of startup. Can someone please refer what is wrong in this approach and/or how to accomplish this?