[linux-lvm] steps to clone a volume group

Michael Jensen beachhangar at yahoo.com
Mon Nov 17 22:58:15 UTC 2008


The information shown from a nov 2007 post has been very useful - much appreciated.

There are some circumstances with the case I am working on that complicates the process a bit.

After having removed the master volume from the host and presenting just a snapshot, I have been able to change the physical uuid, and rename the volume group. If I then re-introduce the master volume there is no conflict (no-duplicates) found by the lvm utilities and can mount both sucessfully.

The constraints I am operating under require the master volume not to disappear - i.e. production system and volume.

If I filter out the snapshot and leave the accept (a) portion - "a|.*|" in the filter line, then a conflict is reported by pvscan, but not between sda and sdb but between sdb and the device-mapper string that appears to use the FC WWN.  
If I remove the accept portion then there is no conflict during pvscan.  
If I attempt to do a --
pvchange --uuid /dev/sda
Failed to read physical volume /dev/sda
0 physical volumes changed / 0 physical volumes not changed

Is the filtered out device name (/dev/sda) supposed to be available to the lvm utilities?

thanks,
mike




________________________________
From: Alasdair G Kergon <agk at redhat.com>
To: LVM general discussion and development <linux-lvm at redhat.com>
Sent: Friday, November 14, 2008 6:55:15 PM
Subject: Re: [linux-lvm] Editing LVM 2 metadata

On Fri, Nov 14, 2008 at 06:37:51PM -0800, Michael Jensen wrote:
> I have a need to edit the metadata on an LVM2 PV.

Why?

If you really have to, please do this using the supplied tools - it's *much*
easier!

vgcfgbackup gives you a text file, edit it, vgcfgrestore puts it back.

If you need to edit the label too, careful use of pvcreate --restorefile --uuid
plus vgcfgrestore lets you do that.

Alasdair
-- 
agk at redhat.com

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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20081117/23718f18/attachment.htm>


More information about the linux-lvm mailing list