# Initial Experience Using Syncthing - CIFS/Samba Issues

**URL:** https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027
**Category:** User Stories
**Created:** [December 17, 2020, 4:07pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027 "2020-12-17T16:07:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lawchristopher](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@lawchristopher](https://forum.syncthing.net/u/lawchristopher)
#### Post date: [December 17, 2020, 4:07pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/1 "2020-12-17T16:07:34Z")

</div>

> [@readdirent: no such file or directory](https://forum.syncthing.net/t/readdirent-no-such-file-or-directory/15950):
>
> I apologize if the solution to this is simple, i am NOT an expert at Syncthing OR Rasbian (or this style OS in general). I was running Syncthing version 1.5.0 off a Raspberry Pi4 running Rasbian at 2 locations. I was using this to Sync data from Site A to Site B (one way, nothing from Site B goes back to Site A. I recently went to update the packages on Site B, and it updated (at that time) to version 1.10 or Syncthing and i started to notice these errors it would say “readdirent: no such file …

TL;DR - If shared folder has to be on a network mount use NFS over CIFS to avoid issues.

So inititally, when I first fired up Syncthing I added 3 nodes (laptop, desktop, and NAS). However, my NAS kept on throwing out errors like in the link above. All it said was “Drive readdirent no such file or directory” and pretty much nothing else. Other issues included:

- Rescan kept on failling
- Files were randomly being deleted from the NAS
- Files would sometime would reappear hours later

No issues with only the desktop and laptop online. Just the NAS causing all the issues. The initial sync goes without a hitch, and about a few hours later that’s when the issues start to come up. After reading through some old threads, it seems like the location of my shared folder was the issue. It sat on a CIFS mount. The fix turned out to be, to turn it into an NFS mount instead. Not sure if this is expected behaviour because it’s not mentioned in the documentation. Is CIFS just bad?

I was reading in other threads where it said that SAMBA/CIFS shouldn’t be an issue. If I’m doing something wrong though it would be great to hear suggestions. I’ll explain my setup the best I can below. I thought I’d share in case anyone else runs into this situation.

1. Using Openmediavault with Docker.
2. Using the linuxserver/syncthing image (1.12.0).
3. NAS (1) mounted a shared folder of another NAS (2) for syncthing.
4. Syncthing config files stayed on NAS (1).

After switching the mount from CIFS to NFS, all seems to be working fine now.

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 17, 2020, 4:32pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/2 "2020-12-17T16:32:39Z")

</div>

Best solution, but I assume that’s not possible: Run Syncthing on NAS (2), i.e. on local storage, not a network drive of any kind.

For the specific issue here my post from the thread you linked should still be accurate:

> [@readdirent: no such file or directory](https://forum.syncthing.net/t/readdirent-no-such-file-or-directory/15950/10):
>
> Also [https://github.com/golang/go/issues/40846](https://github.com/golang/go/issues/40846) fixed in [https://github.com/golang/go/commit/6b420169d798c7ebe733487b56ea5c3fa4aab5ce](https://github.com/golang/go/commit/6b420169d798c7ebe733487b56ea5c3fa4aab5ce) which will be released in go1.16. And just for convenience the workaround env var is GODEBUG=asyncpreemptoff=1.

---

<div class="post-metadata">

### Author: ![lawchristopher](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@lawchristopher](https://forum.syncthing.net/u/lawchristopher)
#### Post date: [December 17, 2020, 4:50pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/3 "2020-12-17T16:50:12Z")

</div>

Oh, that makes a lot more sense now. Re-read your posts. So it’s a Golang issue and not at all Syncthing. If I have it correct, I guess in my scenario I would have to wait for the linuxserver/syncthing maintainer to update the build using go 1.16 when it comes out?

---

<div class="post-metadata">

### Author: ![odin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/odin/32/5905_2.png) [@odin](https://forum.syncthing.net/u/odin)
#### Post date: [December 17, 2020, 6:55pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/4 "2020-12-17T18:55:04Z")

</div>

> [@lawchristopher](#):
>
> The fix turned out to be, to turn it into an NFS mount instead.

I have never before heard of a case where deploying NFS reduced the number of problems. I’d suggest to keep on the lookout - SMB needs fairly constant attention to keep working, but NFS usually needs it in order not to blow up in your face.

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 17, 2020, 7:12pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/5 "2020-12-17T19:12:53Z")

</div>

> [@lawchristopher](#):
>
> If I have it correct, I guess in my scenario I would have to wait for the linuxserver/syncthing maintainer to update the build using go 1.16 when it comes out?

If you use our builds, we usually upgrade on the first Syncthing release after it has come out (barring problems, which usually don’t happen).

> [@odin](#):
>
> I have never before heard of a case where deploying NFS reduced the number of problems. I’d suggest to keep on the lookout - SMB needs fairly constant attention to keep working, but NFS usually needs it in order not to blow up in your face.

Just want to give a counter-experience: I am running both samba and nfs on my debian homeserver since years without any attention and both work flawlessly (I do however also run Syncthing on the homeserver, not on a client pointing at a network share).

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [December 17, 2020, 7:33pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/6 "2020-12-17T19:33:16Z")

</div>

This is might be your experience with some specific device, but generally this is false advice.

There are barely any sensible cifs implementations outside of Windows, where as NFS has quality implementations on all platforms I am aware.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [December 17, 2020, 7:43pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/7 "2020-12-17T19:43:51Z")

</div>

Can I throw in iSCSI and DRBD into the mix? While we’re talking about unreliable crap that will blow up in your face? 💣

---

<div class="post-metadata">

### Author: ![odin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/odin/32/5905_2.png) [@odin](https://forum.syncthing.net/u/odin)
#### Post date: [December 17, 2020, 7:48pm UTC](https://forum.syncthing.net/t/initial-experience-using-syncthing-cifs-samba-issues/16027/8 "2020-12-17T19:48:04Z")

</div>

My argument wasn’t that SMB was better, it was simply that both are prone to failure, and that _when they fail_ NFS tends to do so much, much more spectacularly. (Let’s just say there’s a reason root squash is a thing.)
