Corin

Recovering A Broken Sync Node - V2

Recommended Posts

We have a couple Sync nodes setup using selective sync.  We're running 2.0.120 on all nodes.  One node has all the files and the other nodes have only some of them.  While setting up additional nodes, we accidentally mixed identities between a couple nodes.  That confusion broke the syncing.  Correcting the identities on the nodes did not restore sync functionality.  The selective nodes no longer downloaded files even when the download file pref was set.  Mostly the nodes seemed stalled.  They correctly processed the file pref update but downloading did not happen.

 

After some time spent searching forums for help, we gave up and deleted all .sync folders on the nodes effectively resetting them.  We then set them up again and re-established the link to the node with all the files.  At that point transferring new files was possible, so the nodes were mostly functional again.  However, Sync does not update the state of the previously synced files.  It does index them, is aware the files exist but always indicates it has zero pieces despite the full files being present.  Update the download pref to 1 doesn't help either.  The logs end up looking like this:

 

[20150616 09:05:48.056] SF[C24D] [F24B]: Connect files to peer, queue size 2

[20150616 09:05:48.056] ScheduledTask:ConnectMorePeers invoked:timer reason:UnloadInactiveTorrents - torrent wants connection

[20150616 09:05:48.056] SF[C24D]: Torrent /vmfs/volumes/datastore/folder1/file1.vmdk state:6 error: meta:1 conns:0 io:0

[20150616 09:05:48.056] SF[C24D]: Torrent /vmfs/volumes/datastore/folder1/file1-delta.vmdk state:3 error: meta:1 conns:0 io:16

[20150616 09:05:49.056] SF[C24D]: Will try to find peer for file "/vmfs/volumes/datastore/folder1/file1.vmdk"

[20150616 09:05:49.056] SF[C24D]: Will try to find peer for file "/vmfs/volumes/datastore/folder1/file1-delta.vmdk"

 

So far the only way I've found to get the node back into the correct state is to delete the files off the node and set the download flag to 1 so they are downloaded again.  Downloading again is not a viable solution since we have a large number of files to resync and there are bandwidth limitations.  Is there a way to convince a Sync node that it has a file already without re-downloading?

 

Thanks.

Share this post


Link to post
Share on other sites

I've found a way to work around this:

1. On the node that needs help recalling what was synced, set the download pref to 1 for all files you want it to recall

2. Touch the files.

 

Within seconds, Sync suddenly realizes the files are there and starts reporting that it has all pieces.

 

This works but it gets tedious calling the set_file_prefs API with download=1 for each file.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.