Stuart D Gathman <stu...@gathman.org> writes:

> Use dd to copy the partition table (this also often contains boot code)
> to the new disk on USB.
> Then use dd to copy the smaller partitions (efi,boot). Now use cfdisk
> to delete the 3rd partition. Expand the boot partition to 1G (you'll
> thank me later).
> Allocate the entire rest of the disk to p3.
> Create a new vg with a different name.  Allocate root and swap on
> new VG the same sizes.
> Take a snapshot of current root (delete swap on old drive since you
> didn't leave yourself any room), and use partclone to efficiently
> copy the filesystem over to new root.

Why would you use dd/partclone instead of just having LVM move
everything to the new drive on the fly?

Partition the new drive, use pvcreate to initialize the partition as a
pv, vgextend to add the pv to the existing vg, pvmove to evacuate the
logical volumes from the old disk, then vgreduce to remove it from the
vg.

Don't forget you'll need to reinstall grub on the new drive for it to
boot.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Reply via email to