[Samba] R­e: R­­­e: R­e: D­­C2 d­en­ie­s ­a­c­­cess­­ whe­­­

Rowland Penny rowlandpenny at googlemail.com
Sun Nov 9 02:59:11 MST 2014


On 08/11/14 18:27, Rowland Penny wrote:
> On 08/11/14 18:03, ?icro MEGAS wrote:
>> Hello Rowland, Louis and Min,
>>
>> sorry for late reply, I was really busy in the past days. As Min 
>> already wrote, I have made the same experience unfortunately. With 
>> Rowland's suggested settings it didn't solve the problem. I'm on 
>> another issue at the moment and didn't find time to check the 
>> rsync/unison process on my own, but I'll promise I'll dive into it as 
>> soon as I can. The problem really is related in the "--delete..." 
>> parameter which is exactly doing what the manual of rsync describes 
>> perfectly. I have no idea how to fix it at the moment, but if you 
>> have more clues I'd appreciate your opinion.
>>
>> Nice weekend,
>> Mirco.
>>
> The problem is that rsync is one way, what I think happens is that 
> rsyncs what is in 'sysvol' on DC1 to DC2 and the '--delete-after' 
> removes anything on DC2 that is not on DC1, then unison syncs back to 
> DC1 from DC2, but as there is no difference, there is nothing to sync. 
> In my tests, removing the option from the sync command, stops the 
> difference being deleted from DC2 and then unison sync's the 
> difference to DC1.
>
> Rowland
>
>>>> On 08/11/14 16:50, Min Wai Chan wrote:
>>>> Yep...
>>>>
>>>> Just like the original issue report by Megas.
>>>> But with your suggested changes... Which is odd...
>>>> Dear Louis and Rowland,
>>>>
>>>> I've try to do as suggested
>>>>
>>>> /root/.unison/default.prf
>>>> remove
>>>> perms=0
>>>> add
>>>> owner=true
>>>> group=true
>>>>
>>>> But still the problem on folder removed still happen...
>>>>
>>>> Strange...
>> the culprit is related to the switch "--delete-after" but the most 
>> important thing is that unison seems to be misconfigured. Normally 
>> unison should sync in both directions, but actually is syncing only 
>> from dc1-->dc2.
>>
>> Any thoughts how to fix it? I never worked with unison before :(
>>
>> Mirco.
>
That is not going to work either!
OK, if you create a dir on the second DC, it is now synced to the first 
and vica-versa, deletion is quite a different matter.

If you delete a dir on the first DC, is is also deleted on the second.
If you delete a dir on the second DC, it gets put back from the first DC.

OK, after a bit of thought, I have come up with a couple of scripts that 
use inotifywait & rsync, these seem to work, if you create a dir on one 
DC it is synced to another, if you delete a dir it is deleted from the 
other, also the way the second script is written means that it should 
work with more than two DC's, anybody want to test it ??

Rowland


More information about the samba mailing list