[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Copying LVM from one system to another



Ming Zhang wrote:
> if HW is the same, why not use ghost or alike software to do a clone?

Don't "clone" the LVM PVs if you ever want to connect both disks simultaneously.
For normal partitions this is fine, as those are identified by the device
name. So you can easily distinguish /dev/hda1 from /dev/hdc1.

LVM however identifies the different VG/LV/PV by its content, regardless of
where the disks are connected. If you connect your LVM disk to a different
cable or controller, don't worry, it will be found automatically. If two disks,
however, look exactly the same, LVM gets confused. 

Instead you should connect both disk:

arrange booting from <newdisk>,
lvm from <olddisk> should still work, even if connected differently.

pvcreate <new disk>
vgextend <new disk>
pvmove <olddisk>
vgreduce <olddisk>

to migrate all LVM content to the new disk.

Dieter.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]