<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2>Hi</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>I am exploring the
use of DRBD as a backup system for some servers. </FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>So far
</FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial size=2>I've
installed it on a couple of test servers, and it's worked well -
</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>once I understood
</FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial size=2>some
idiosynchrasies of the command line :)</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>But my objective is
a little more ambitious than just making a single online</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>backup. <SPAN
class=484354417-06022005><FONT face=Arial size=2>What I'd ideally like to do -
and I've seen this asked for before</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005><FONT face=Arial size=2>-
</FONT></SPAN></FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial
size=2><SPAN class=484354417-06022005><FONT face=Arial size=2>is achieve
incremental backup also, so I have both </FONT></SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>the current backup </SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>of the server and also a backup from last week, for
</SPAN></FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial
size=2><SPAN class=484354417-06022005>example. </SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>Of course, I can do this by taking down the DRBD
connection, and using</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2>a simple DD to backup the
secondary. But my servers are quite big - </FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>100gb or so - and
it's hard to do this in a realistic time. </FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>I have figured out a
number of creative solutions to this:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2> -
Run DBRD on top of LVM</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2> -
Run Ext3Cow (copy-on-write filesystem) on top of DRBD</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>
</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2> -
Run DRBD on top of cowloop (a copy-on-write block driver)</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>But there's a snag
with each of them:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2> -
LVM seems inefficient if you add multiple snapshots</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2> -
Ext3Cow has no way of deleteing snapshots</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
DRBD won't actually load on top of cowloop ...</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>I guess I should say
that this is largely an experimental endeavour -</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>if I can make it
work, it would solve a problem, but I am also </FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>just curious about
what's possibe.</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>So.. I have some
questions:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005></SPAN><SPAN
class=484354417-06022005></SPAN><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>How to take backups
of the secondary ?</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2>----------------------------------------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>Imagine this
case:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
My main server, 'alpha' is primary</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
My backup server, 'beta' is secondary</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>At midnight, I want
to take an additional backup of the</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>secondary. I
only need RO access, but I'm not supposed</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>to mount the
secondary. </FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>This is my
approach:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Disconnect DRDB</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Change beta to primary</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial
size=2> - Mount it</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Make a backup</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Unmount</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Change it back to secondary</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Reconnect</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>It this
correct?</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>What about
this:</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial
size=2> - Disconnect DBRD</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Sync drives</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Mount either the DRBD device or the underlying physical disk
RO</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005> <FONT face=Arial size=2>-
Make backup..</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005><FONT face=Arial size=2>Can you tell if there are
sectors waiting to sync?</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>-------------------------------------------------------------------</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>Imagine we have the previous example, and while DRBD is
disconnected</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>someone on the primary server copies a 100mb file to
the drive. This means</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>we have 100mb waiting to
sync..</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>I tried exactly this case, copying a 100mb file, then
reconnecting. I then</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>immediate ran </SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>cat /proc/dbrd - but it did not show sync in
progress.</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>If there are sectors being written because of a
reconnect, does DRBD show</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>them on proc?</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>(It occurs to me now that the 100mb file I copied was
probably sparse,</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>so it may have had a very small amount of real data,
although the copy</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>took a long time)</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>
<DIV></SPAN></FONT></SPAN></FONT></SPAN><SPAN class=484354417-06022005><FONT
face=Arial size=2><SPAN class=484354417-06022005><FONT face=Arial size=2>How
does DRBD decide which way to
Sync?</FONT></SPAN></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>----------------------------------------------------------------</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>Just curious...</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>Imagine the scenario above again, but this time I
write sectors to both</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>drives while disconnected. </SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>How does DRBD decide which one is primary? If I
make one secondary</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>before the reconnect, does it assume that one is to be
overwritten?</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005>I guess I should try it
out...</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2><SPAN
class=484354417-06022005></SPAN> </DIV></FONT></SPAN>
<DIV><SPAN class=484354417-06022005><SPAN class=484354417-06022005><FONT
face=Arial size=2>Incremental Backup</FONT></SPAN></DIV>
<DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2>----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>Has anyone tried any
of the incremental backup solutions listed above?</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005></SPAN><SPAN
class=484354417-06022005></SPAN><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>Finally -
</FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial size=2>has anyone
patched DBRD to include snapshots? </FONT></SPAN><SPAN
class=484354417-06022005><FONT face=Arial size=2>Or is this a
</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial size=2>possible future
feature?</FONT></SPAN></DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484354417-06022005><!-- Converted from text/plain format -->
<P align=left><FONT face=Arial size=2>Best Regards<BR><BR>Martin
Green<BR></FONT></SPAN><SPAN class=484354417-06022005><FONT face=Arial
size=2></FONT></SPAN></P></DIV></SPAN></DIV></BODY></HTML>