Replacing a disk

The external USB hard drive holding a few Syncthing shares on one of my nodes is failing and needs replacing. I was wondering if I need to think of anything specific when replacing the drive, to e.g. avoid (apparent) data loss being propagated to the other nodes?

I was planning to:

  • Stop the syncthing service
  • Unmount the failing disk
  • Connect a new disk, format it and mount it in place of the failing one
  • Restart the syncthing service

Is this the way to go? Will Syncthing notice the missing shares, recreate them and populate them from the other nodes?

Thank you.

If all of the contents of a shared folder disappear, that’s OK: Syncthing will detect that the .stfolder file in the root of the shared folder no longer exists, and will mark the folder as error’d.

This also means that Syncthing won’t automatically recreate the missing shared folders. Likewise if you manually re-create a shared folder and manually create the .stfolder file, Syncthing will now think that you’ve deleted all of your files and will dutifully remove them from all other nodes…

Either remove and re-add the folders using Syncthing’s GUI, or (and you’ll probably want confirmation from @AudriusButkevicius before doing this) delete your database, re-create the shared folder paths (complete with .stfolder file), and start Syncthing again.

1 Like

Best way is to remove them, restart and readd them later. Or just nuke index directory so that it would forget about existence of the files.

1 Like

Thanks @AudriusButkevicius and @canton7, I’ll do the delete/re-add dance, this sounds easier.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.