[DRBD-user] DRBD Questions

Martin Green martin.green at bbconsult.co.uk
Sun Feb 6 19:13:33 CET 2005

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


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

Martin Green




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20050206/0b9689f4/attachment.htm>


More information about the drbd-user mailing list