Rclone, mounting and samba


#1

Hi There.

I’ve been doing some testing trying to mount cloud storage with rclone and in turn share that out via samba. I have managed to get this working, but I am finding an issue with changes flowing in both directions.

An example. I mounted a NextCloud webdav share with rclone, and shared that mount with samba. Changes made on the local file system or through samba share would be reflected immediately in the Nextcloud web console. But, changes made in the web console (like deleting a folder) would not be reflected in the local file system or the samba share.

As another test I tried doing the same thing but mounted the same webdav share with fuse davfs2 instead - everything worked perfectly! Changes made anywhere would be reflected everywhere immediately.

I tried mucking around with all of the different caching options. I’ve also tried the suggestions in here: Cache Mount Samba Share Issue?
I’ve also experimented with different backends, OD and OD4B and found similar behaviour.

Using latest stable version of rclone, v1.44, and found the same thing on Ubuntu 18.10 and Alpine 3.8.1

Does anyone have any suggestions? Happy to send configuration files, logs etc, but I’d have to set this up again. Thought I’d check beforehand in case it’s something simple I missed.

Thanks in advance

Doubleddav


#2

Nextcloud doens’t have a notification system for file changes (or if it does rclone isn’t using it). You’ll need to use this to control the time that the changes take to show in the mount

   --dir-cache-time duration            Time to cache directory entries for. (default 5m0s)

I suspect davfs2 is using a shorter directory cache time by default. Since the server is local you might as well set the --dir-cache-time quite small, say 5s.


#3

Thanks for that, I set --dir-cache-time to 5s and it worked!


#4

I realise this is an old thread, but how did you get samba and rclone working? is it still working for you? could you perhaps share your .rclone.conf and smb.conf files with me perhaps? what does your rclone mount command look like?

I am having issues with samba aborting the connection when accessing the rclount mount with it.