How to clean up after syncserver

Bron Gondwana brong at
Mon Apr 13 19:51:44 EDT 2009

On Mon, 13 Apr 2009 21:29 +0200, "Michael Glad" <glad at> wrote:
> Cyrus being restarted / sync server abending, apparently causes it to 
> leave sub dirs in the 'sync.' dirs containing hard links  to messages.
> They currently sum to 40k+ links on one of my replicas :-( .

That's a lot of sync server failures!

> I noticed them during an yet unsuccessful attempt to find out why 
> message body inconsistencies now and then occur
> between master and replica.

We should have fixed that a while back - but yes, for a little while it would
just open the hardlinked file and truncate it without unlinking first - causing
random corruption.  Really, REALLY annoying.  The bug certainly doesn't
exist in 2.3.14 - I spent quite a while auditing all the paths that open files!

> The 40k+ entries annoy me and I have a uneasy feeling that they may be 
> involved in the creating the inconsistencies.
> So is there a way to clean up the  sync. dirs --  can one just remove 
> the sub dirs / hard links while the sync server is down?

Yes, you certainly can.

> ------------------------
> The inconsistencies seem to arise when a user delete a message, thereby 
> copying it to a trash folder.
> Now and then, this action on the replica nukes a message file owned by 
> another user on the same cyrus partition, so
> that the trash file and the two user mailbox files are now hardlinked 
> together.

It's any COPY action actually.  Trash is just a common target for copies.

> Environment: 2.3.14 + FM patches as of 2009-03-31 on RHEL 5.3/x86_64.
> Single instance store + fast rename + delayed delete + delayed expunge

Yikes... I really should go audit that fastrename code again :)  We're not
running it ourselves due to some worries about concurrency safety... I'm
pretty sure it's OK actually, but it could do with a re-read.

  Bron Gondwana
  brong at

More information about the Info-cyrus mailing list