[linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs

Holger Rauch holger.rauch at heitec.de
Tue Sep 11 10:12:50 UTC 2007


Replying to myself this time :-) Just found out about uuidgen. Would that be
OK? I'm thinking about invoking pvcreate like this:

pvcreate --uuid $(uuidgen) /dev/sdb

(I don't want't to forcefully recreate a PV, I just want to be able to
assign a different UUID to it in order keep LVM from "thinking" that PV
still belongs to some other VG).

But, on the other hand, I also just noticed that the UUIDs of PVs, VGs, LVs
are formatted differently from those generated by uuidgen. Or can LVM also
use UUIDs that are formatted differently?

So, my question about a UUID generation tool for proper UUID usage within
LVM seems to be still valid...

On Tue, 11 Sep 2007, Holger Rauch wrote:

> Hi to everybody,
> 
> ok, if running pvcreate is necessary, what tool can I use for generating
> my own UUID (for passing them to the --uuid cmd line switch of pvcreate)
> just in case the PV previously belonged to a different VG?
> 
> TIA.
> 
> Greetings,
> 
> 	Holger
> 
> On Mon, 10 Sep 2007, malahal at us.ibm.com wrote:
> 
> > I don't think so. /dev/sdb will have the same partition table as
> > /dev/sda from the sfdisk command.  I bet you need to run pvcreate and
> > vgcreate before running the rest of the script.
> > 
> > Thanks, Malahal.
> > [...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20070911/8a115d4d/attachment.sig>


More information about the linux-lvm mailing list