linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] How to "clone" a logical volume
@ 2008-03-07 15:34 Lionel Kernux
  2008-03-07 15:44 ` Tomasz Chmielewski
  0 siblings, 1 reply; 5+ messages in thread
From: Lionel Kernux @ 2008-03-07 15:34 UTC (permalink / raw)
  To: linux-lvm

Hi,

Here's what I'm trying to do:

I have an LV that is being used as a physical disk for a XEN virtual machine.
I want to "clone" the VM.
lvcreate -L 75G -n virtualmachine_clone_lv VG00
dd if=/path/to/virtualmachine_lv of=/path/to/virtualmachine_clone_lvT

This method would be perfect if it wasn't for the fact that now I have
2 LV's with the same uuid....not good...
Is there a way to do this (ie. copy an LV but change its uuid, or
create a duplicate of the source LV with a new uuid?)

I want to do this WITHOUT using any XEN cloning tools (buggy).

Thanks

LK

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] How to "clone" a logical volume
  2008-03-07 15:34 [linux-lvm] How to "clone" a logical volume Lionel Kernux
@ 2008-03-07 15:44 ` Tomasz Chmielewski
  2008-03-07 16:06   ` Lionel Kernux
  0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2008-03-07 15:44 UTC (permalink / raw)
  To: LVM general discussion and development

Lionel Kernux schrieb:
> Hi,
> 
> Here's what I'm trying to do:
> 
> I have an LV that is being used as a physical disk for a XEN virtual machine.
> I want to "clone" the VM.
> lvcreate -L 75G -n virtualmachine_clone_lv VG00
> dd if=/path/to/virtualmachine_lv of=/path/to/virtualmachine_clone_lvT
> 
> This method would be perfect if it wasn't for the fact that now I have
> 2 LV's with the same uuid....not good...

What UUID are you talking about here? Filesystem UUID, or LVM UUID?

If about LVM UUID, it will not be the same if you dd a LV - UUID is 
stored somewhere else.

Filesystem UUID (if any) will remain the same, of course, as it's the 
exact copy.



-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] How to "clone" a logical volume
  2008-03-07 15:44 ` Tomasz Chmielewski
@ 2008-03-07 16:06   ` Lionel Kernux
  2008-03-07 16:37     ` Tomasz Chmielewski
  0 siblings, 1 reply; 5+ messages in thread
From: Lionel Kernux @ 2008-03-07 16:06 UTC (permalink / raw)
  To: LVM general discussion and development

Hi,

Thanks for the reply.

I'm talking about LVM uuid...I assumed that it is stored somwhere on
the actual LV...is this not the case? If not, my problem is solved!

So...Just to be sure:

If I dd my source LV to my destination LV (which has alraedy been
created through  lvcreate) then LVM wont care and will activate it and
all will be well?

Thanks

LK

On Fri, Mar 7, 2008 at 10:44 AM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
> Lionel Kernux schrieb:
>
> > Hi,
>  >
>  > Here's what I'm trying to do:
>  >
>  > I have an LV that is being used as a physical disk for a XEN virtual machine.
>  > I want to "clone" the VM.
>  > lvcreate -L 75G -n virtualmachine_clone_lv VG00
>  > dd if=/path/to/virtualmachine_lv of=/path/to/virtualmachine_clone_lvT
>  >
>  > This method would be perfect if it wasn't for the fact that now I have
>  > 2 LV's with the same uuid....not good...
>
>  What UUID are you talking about here? Filesystem UUID, or LVM UUID?
>
>  If about LVM UUID, it will not be the same if you dd a LV - UUID is
>  stored somewhere else.
>
>  Filesystem UUID (if any) will remain the same, of course, as it's the
>  exact copy.
>
>
>
>  --
>  Tomasz Chmielewski
>  http://wpkg.org
>
>  _______________________________________________
>  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/
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] How to "clone" a logical volume
  2008-03-07 16:06   ` Lionel Kernux
@ 2008-03-07 16:37     ` Tomasz Chmielewski
  2008-03-07 18:19       ` Lionel Kernux
  0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2008-03-07 16:37 UTC (permalink / raw)
  To: LVM general discussion and development

Lionel Kernux schrieb:
> Hi,
> 
> Thanks for the reply.
> 
> I'm talking about LVM uuid...I assumed that it is stored somwhere on
> the actual LV...is this not the case? If not, my problem is solved!
> 
> So...Just to be sure:
> 
> If I dd my source LV to my destination LV (which has alraedy been
> created through  lvcreate) then LVM wont care and will activate it and
> all will be well?

Yep, it will work just fine.

You may also consider using snapshots, although it has some performance 
penalties involved.

-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] How to "clone" a logical volume
  2008-03-07 16:37     ` Tomasz Chmielewski
@ 2008-03-07 18:19       ` Lionel Kernux
  0 siblings, 0 replies; 5+ messages in thread
From: Lionel Kernux @ 2008-03-07 18:19 UTC (permalink / raw)
  To: LVM general discussion and development

YES!

Thanks...worked like a charm....

LK


On Fri, Mar 7, 2008 at 11:37 AM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
> Lionel Kernux schrieb:
>
> > Hi,
>  >
>  > Thanks for the reply.
>  >
>  > I'm talking about LVM uuid...I assumed that it is stored somwhere on
>  > the actual LV...is this not the case? If not, my problem is solved!
>  >
>  > So...Just to be sure:
>  >
>  > If I dd my source LV to my destination LV (which has alraedy been
>  > created through  lvcreate) then LVM wont care and will activate it and
>  > all will be well?
>
>  Yep, it will work just fine.
>
>  You may also consider using snapshots, although it has some performance
>  penalties involved.
>
>  --
>
>
> Tomasz Chmielewski
>  http://wpkg.org
>
>  _______________________________________________
>  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/
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-07 18:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07 15:34 [linux-lvm] How to "clone" a logical volume Lionel Kernux
2008-03-07 15:44 ` Tomasz Chmielewski
2008-03-07 16:06   ` Lionel Kernux
2008-03-07 16:37     ` Tomasz Chmielewski
2008-03-07 18:19       ` Lionel Kernux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).