[CentOS] Migration help please - moving OS to a different LVM partition

Barry L. Kline blkline at attglobal.net
Tue Jun 19 21:13:27 UTC 2007

Hash: SHA1

Robert Moskowitz wrote:
> I have set up a migration between two drives.  fIrst I got Centos 5
> working how I wanted on this drive, then set about copying it to another
> drive.

Hi Robert.

It's a little late now, but the way I'd do this kind of thing is to
install on the first drive, creating a partition for /boot and a
partition for LVM under which I'd carve up into my other partitions.

Once I have installed to the first drive, I would add the second drive,
and partition it so that there is a partition for /boot, which you'd
then copy the data from the primary /boot to this one and then use
'grub' to make the second drive bootable.

Next, create a physical volume on the new disk's LVM partition and then
add it into the existing volume group.  Next, use the pvmove command to
move the data from the pv on the first drive to the pv on the second
drive.  Once you've done that, you can pvremove the first pv (from the
first drive) from the volume group.  At this point, you should have all
of your data on the second drive.  Double-check that the LABEL on the
/boot partition is correct and then shut down the computer.  Remove the
first drive and reboot.

I'm writing this off the top of my head (having done is a couple of
months ago to upgrade my laptop hard drive), and I may be missing some
of the LVM incantations, but this should be close and get you started,

Version: GnuPG v1.2.6 (GNU/Linux)


More information about the CentOS mailing list