Redundant NFS storage setup

Marcus Bointon marcus at synchromedia.co.uk
Wed Nov 28 03:34:33 CST 2007


On 27 Nov 2007, at 20:19, Kuba Ober wrote:

> Well, I use rsync just for that, and it works fine (see below). You  
> probably
> forgot --delete option :)


No, that doesn't help because rsync doesn't know what was there  
before, it only considers what is there now. I have 2 machines of  
equal status - either one can receive new files or have existing files  
deleted. In this scenario, file2 has been deleted from B, and file3  
has been freshly uploaded to B:

Server A:
file1
file2

Server B:
file1
file3

so, A rsyncs to B, and B gets a new copy of file2. B rsyncs to A and A  
gets a copy of file3. As far as B is concerned, file2 just came back  
from the dead because the delete was not propagated. If we used rsync  
with --delete, it would result in file2 being copied to B (incorrect)  
and file3 being deleted on B (incorrect). Not good.

Csync2 tracks the deletes, so when file2 is deleted on B, csync2 knows  
that it used to be there and should not be copied back from A, and so  
it (correctly) gets deleted on A. Because file3 didn't previously  
exist on A, A gets a new copy, and the servers are in sync. csync2 is  
like simultaneous bidirectional rsync with a memory.

rsync can work as you suggest if you have a single master, but that's  
not my situation.

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info at hand CRM solutions
marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/




More information about the Linux-PowerEdge mailing list