Fsync folder error seafile 6.0.7 (docker run)

Dear seafile users, new to the forum so I hope my question is in the right place. I created a working seafile docker image that runs on FreeNAS 10. All is well and seafile runs like a champ! However when I mount the seafile-data directory to the host. They both have the same user and group id. For good measure also tried chmod 777, but always the same result:

[12/29/16 14:58:50] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[12/29/16 14:58:50] listen-mgr.c(120): listen on port 12001 for block tranfer
[12/29/16 14:58:50] …/common/obj-backend-fs.c(178): Failed to fsync dir /home/seafile/seafile-data/storage/commits/14bbdc45-5d
a3-49c8-9c44-242dc20f1d9d/88: Is a directory.
[12/29/16 14:58:50] …/common/obj-backend-fs.c(315): [obj backend] Failed to write obj 14bbdc45-5da3-49c8-9c44-242dc20f1d9d:887
[12/29/16 14:58:50] repo-mgr.c(3162): Failed to add commit.
[12/29/16 14:58:50] seafile-session.c(398): Failed to create system default repo.

I see the Seafile container creating folder and files just fine (i.e. the host directory is populated after finishing the building process). The errors associated with this are no library and not being able to create one. Hope someone can point me in the right direction.

I’m not familiar with FreeNAS (freebsd). But I guess the problem may be that freebsd doesn’t support calling fsync() system call on a directory? Or maybe a limitation on the file system? When writing a commit object to disk, Seafile use fsync() to ensure that object is flushed to disk, including it’s parent directory.

It looks like your right. It asked the same question over at the FreeNAS forum and they also suggested the 9pfs filesystem is not playing nice. Thank you very much for the feedback and I will report back when there is progress on the issue.

BTW, glad to know Seafile docker runs well on FreeNAS. Which package do you use? Is your FreeNAS server x86 based?

Well running but not working due to the fsync() error described above. But the FreeNAS crew is on it so I have complete faith in those guys.

The container I’m using is the sunx/seafile docker enhanced with FreeNAS metadata. The system itself is running on the latest FreeNAS 10 beta, that will run on (almost) any x86_64 hardware.

So we cracked it! It turned out to be just like suggested here: fsync() was not playing nice with 9pfs. The container we are using is enhanced with meta-data specific for FreeNAS 10: https://hub.docker.com/r/freenas/seafile/ and has sunx/seafile:latest at its core. Topic can be marked as solved :slight_smile:

Hey, glad to hear that it works now on FreeNAS! Thanks for the information too.