[linux-lvm] creating DD copies of disks

Lars Ellenberg lars.ellenberg at linbit.com
Sat Sep 17 13:49:36 UTC 2016


On Sat, Sep 17, 2016 at 09:29:16AM +0200, Xen wrote:
> I want to ask again:
> 
> What is the proper procedure when duplicating a disk with DD?

depends on what you define as "proper",
what the desired outcome is supposed to look like.

What exactly are you trying to do?

If you intend to "clone" PVs of some LVM2 VG,
and want to be able to activate that on the same system
without first deactivating the "original",
I suggest:

1) create consistent snapshot(s) or clone(s) of all PVs
2) import them with "vgimportclone",
which is a shell script usually in /sbin/vgimportclone,
that will do all the neccessary magic for you,
creating new "uuid"s and renaming the vg(s).

> - my experience indicates that pvchange -ay on a PV that contains a
> duplicate VG, even if it has a different UUID, but with an identical name,
> creates problems.

You don't say...

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT




More information about the linux-lvm mailing list