[linux-lvm] Cloning Logical Volumes

Greg Hartzog glhartzog at comcast.net
Tue May 2 01:26:22 UTC 2006


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 at redhat.com [mailto:linux-lvm-bounces at 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 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! 

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20060501/26d08f7a/attachment.htm>


More information about the linux-lvm mailing list