Re: Steps to "clone" a volume group

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

 



Fine for testing, but if running this on a production system
you should tweak this so that your machine remains bootable
should it crash at any stage of the procedure.

On Thu, Nov 22, 2007 at 03:18:43PM +0000, Bryn M. Reeves wrote:
> 1. Deactivate the VG
 
Not necessary if done as follows.

> 2. Create the cloned PV(s)
> 3. For each original PV, create a filter entry in /etc/lvm/lvm.conf to
> temporarily mask the PV from the LVM tools.

Swap order there: the system's lvm.conf should mask out the new PVs
*before* they get created.

> Once the filters are set up, remove the LVM persistent cache:

Never required: the pvscan will do that for you.

Create a temporary alternative lvm system directory holding 
a copy of lvm.conf that has filters to accept only
the new copies of the PVs and set LVM_SYSTEM_DIR to use it.

Only now do step 2.

> 4. Modify the cloned volume group name, ID and physical volume IDs to
> avoid name and UUID clashes between the original and cloned devices:

(with LVM_SYSTEM_DIR set)
 
> 5. Remove filtering rules & verify both VGs co-exist correctly

discard LVM_SYSTEM_DIR env var & directory

Alasdair
-- 
agk@redhat.com

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

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux