<html>
<body>
At 03:21 PM 4/27/2006, Jonathan E Brassow wrote:<br>
<blockquote type=cite class=cite cite="">dd is probably the best way
right now. <br><br>
in the future, the clone would probably take the form: <br>
prompt> lvconvert -m1 vg/lv; (wait for sync); lvsplit vg/lv <br><br>
The syntax isn't worked out yet and lvsplit is not there yet... but we
have talked about doing something like that. <br><br>
brassow </blockquote><br>
One possibility that occurs to me is to use RAID-1 under LVM and then
clone your LVM file system(s)<br>
by splitting a software RAID-1 clone (e.g. MD driver).  Even if you
don't want to pay the price of redundant<br>
disks in your final system configuration, you can leave it with a single
1/2 RAID set with no loss of reliability<br>
(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<br>
more difficult for me to see how you would separate the clone out that
way.<br><br>
Just a thought.  I use such RAID-1 cloning quite often and find it
very convenient.  It seems to me it<br>
would work fine in this case.  About the only thing I find I have to
be careful of is to be sure that if<br>
I'm cloning the /boot (or /root if it includes /boot) file system that I
make sure the boot record is in<br>
place (in my case running grub and writing the appropriate record on the
appropriate disk before<br>
splitting the RAID system for cloning).<br><br>
I still don't trust LVM for recovering munged file systems (no effective
mechanism for fsck if you<br>
can't get to the LVM file system, init problems for RAID-10, etc. as
mentioned previously on<br>
this list) so I'm not using LVM at this time and haven't tested the above
mechanism.  You're<br>
mileage may vary.<br><br>
<blockquote type=cite class=cite cite="">On Apr 26, 2006, at 5:55 PM,
Greg Hartzog wrote: <br><br>
<blockquote type=cite class=cite cite=""><font size=5>Hello there
folks.  I have a question.</font> <br>
<font size=5> </font> <br>
<font size=5>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.</font> <br>
<font size=5> </font> <br>
<font size=5>I would love to use dm-mirror to do this, but I do not think
any interface has been provided to do this yet.</font> <br>
<font size=5> </font> <br>
<font size=5>All suggestions and ideas appreciated.</font> <br>
<font size=5> </font> <br>
<font size=5>I am running lvm2-2.02.04-r1 & 2.6.15 kernel.</font>
<br>
<font size=5> </font> <br>
<font size=5>Thanks!</font> </blockquote>
<x-sigsep><p></x-sigsep>
--Jed
<a href="http://www.nersc.gov/~jed/" eudora="autourl">
http://www.nersc.gov/~jed/</a></body>
</html>