linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Cloning Logical Volumes
@ 2006-04-26 22:55 Greg Hartzog
  2006-04-27 22:21 ` Jonathan E Brassow
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Hartzog @ 2006-04-26 22:55 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

Hello there folks.  I have a question.

 

I am looking for a better way of cloning logical volumes then creating a new
logical volume, identical to a source logical volume, and using "dd" to copy
data between the two logical volumes.

 

I would love to use dm-mirror to do this, but I do not think any interface
has been provided to do this yet.

 

All suggestions and ideas appreciated.

 

I am running lvm2-2.02.04-r1 & 2.6.15 kernel.

 

Thanks!

 


[-- Attachment #2: Type: text/html, Size: 3044 bytes --]

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

* Re: [linux-lvm] Cloning Logical Volumes
  2006-04-26 22:55 [linux-lvm] Cloning Logical Volumes Greg Hartzog
@ 2006-04-27 22:21 ` Jonathan E Brassow
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan E Brassow @ 2006-04-27 22:21 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

dd is probably the best way right now.

in the future, the clone would probably take the form:
prompt> lvconvert -m1 vg/lv; (wait for sync); lvsplit vg/lv

The syntax isn't worked out yet and lvsplit is not there yet... but we 
have talked about doing something like that.

  brassow


On Apr 26, 2006, at 5:55 PM, Greg Hartzog wrote:

> Hello there folks.  I have a question.
>  
> I am looking for a better way of cloning logical volumes then creating 
> a new logical volume, identical to a source logical volume, and using 
> “dd” to copy data between the two logical volumes.
>  
> I would love to use dm-mirror to do this, but I do not think any 
> interface has been provided to do this yet.
>  
> All suggestions and ideas appreciated.
>  
> I am running lvm2-2.02.04-r1 & 2.6.15 kernel.
>  
> Thanks!
>  
> _______________________________________________
> 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/

[-- Attachment #2: Type: text/enriched, Size: 2024 bytes --]

dd is probably the best way right now.


in the future, the clone would probably take the form:

prompt> lvconvert -m1 vg/lv; (wait for sync); lvsplit vg/lv


The syntax isn't worked out yet and lvsplit is not there yet... but we
have talked about doing something like that.


 brassow



On Apr 26, 2006, at 5:55 PM, Greg Hartzog wrote:


<excerpt><fontfamily><param>Arial</param><bigger><bigger>Hello there
folks.  I have a question.</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger>I am looking for a
better way of cloning logical volumes then creating a new logical
volume, identical to a source logical volume, and using “dd” to copy
data between the two logical volumes.</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger>I would love to use
dm-mirror to do this, but I do not think any interface has been
provided to do this yet.</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger>All suggestions and
ideas appreciated.</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger>I am running
lvm2-2.02.04-r1 & 2.6.15 kernel.</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger>Thanks!</bigger></bigger></fontfamily>

<fontfamily><param>Arial</param><bigger><bigger> </bigger></bigger></fontfamily>

_______________________________________________

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/</excerpt>

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

* RE: [linux-lvm] Cloning Logical Volumes
       [not found] <7.0.1.0.0.20060501165213.07a4ce50@nersc.gov>
@ 2006-05-02  1:26 ` Greg Hartzog
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Hartzog @ 2006-05-02  1:26 UTC (permalink / raw)
  To: 'LVM general discussion and development'

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

I appreciate the suggestion about using MD driver.

 

However, I have already built MD devices which are hosting the volume groups
and logical volumes.

 

I am not aware of being able to using the MD driver with MD devices as
opposed to non MD devices (mirroring a mirror rather then mirroring straight
disk partitions).

 

Does any know if this is possible?

 

Thanks!

 

  _____  

From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
Behalf Of Jed Donnelley
Sent: Monday, May 01, 2006 8:05 PM
To: LVM general discussion and development
Subject: Re: [linux-lvm] Cloning Logical Volumes

 

At 03:21 PM 4/27/2006, Jonathan E Brassow wrote:



dd is probably the best way right now. 

in the future, the clone would probably take the form: 
prompt> lvconvert -m1 vg/lv; (wait for sync); lvsplit vg/lv 

The syntax isn't worked out yet and lvsplit is not there yet... but we have
talked about doing something like that. 

brassow 


One possibility that occurs to me is to use RAID-1 under LVM and then clone
your LVM file system(s)
by splitting a software RAID-1 clone (e.g. MD driver).  Even if you don't
want to pay the price of redundant
disks in your final system configuration, you can leave it with a single 1/2
RAID set with no loss of reliability
(over no RAID).  You can even do the RAID-1ing on a single disk if that has
any potential value, but it's a bit
more difficult for me to see how you would separate the clone out that way.

Just a thought.  I use such RAID-1 cloning quite often and find it very
convenient.  It seems to me it
would work fine in this case.  About the only thing I find I have to be
careful of is to be sure that if
I'm cloning the /boot (or /root if it includes /boot) file system that I
make sure the boot record is in
place (in my case running grub and writing the appropriate record on the
appropriate disk before
splitting the RAID system for cloning).

I still don't trust LVM for recovering munged file systems (no effective
mechanism for fsck if you
can't get to the LVM file system, init problems for RAID-10, etc. as
mentioned previously on
this list) so I'm not using LVM at this time and haven't tested the above
mechanism.  You're
mileage may vary.




On Apr 26, 2006, at 5:55 PM, Greg Hartzog wrote: 




Hello there folks.  I have a question. 
  
I am looking for a better way of cloning logical volumes then creating a new
logical volume, identical to a source logical volume, and using \x13dd\x14 to copy
data between the two logical volumes. 
  
I would love to use dm-mirror to do this, but I do not think any interface
has been provided to do this yet. 
  
All suggestions and ideas appreciated. 
  
I am running lvm2-2.02.04-r1 & 2.6.15 kernel. 
  
Thanks! 

--Jed http://www.nersc.gov/~jed/


[-- Attachment #2: Type: text/html, Size: 8211 bytes --]

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

end of thread, other threads:[~2006-05-02  1:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26 22:55 [linux-lvm] Cloning Logical Volumes Greg Hartzog
2006-04-27 22:21 ` Jonathan E Brassow
     [not found] <7.0.1.0.0.20060501165213.07a4ce50@nersc.gov>
2006-05-02  1:26 ` Greg Hartzog

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).