Using rclone to cache NAS files to work from local SSD instead of network: SMB or SFTP or something else?

What is the problem you are having with rclone?

I have a TrueNAS server at home that I work from via SMB, mainly for photoshop and light video editing. Often I need to leave and continue working somewhere else, I just close my laptop's lid and bring it along. The laptop is always connected to my VPN so once it wakes up and I'm not home, the open files still work, but performance gets pretty bad, as it usually does for SMB over VPN. I want to use rclone mount with full cache instead to mount the SMB share, and work from it even when I'm home, so I can work from cached files locally, and have rclone update the changes as they happen.

I mount the SMB share to a local directory, and use it as the source dir for my rclone mount command. Apparently this doesn't support pooling for changes, right? Because of that, should I be mounting it as something else, like SFTP?

I want to achieve the best performance possible when working from the mount while I'm at home, while still having good performance while I'm working out of home, connected via VPN. Please let me know if there are updates to my mount command that can improve performance.

Run the command 'rclone version' and share the full output of the command.

❯ rclone version
rclone v1.58.1

  • os/version: darwin 12.3.1 (64 bit)
  • os/kernel: 21.4.0 (arm64)
  • os/type: darwin
  • os/arch: arm64
  • go/version: go1.17.9
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Local Directory, mounted SMB drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount /Volumes/NAS /Users/me/rcloneNAS 
--vfs-cache-mode full
--vfs-read-ahead 1000M 
--vfs-read-chunk-size 256M
--vfs-cache-max-size 150G 
--vfs-cache-max-age 336h
--cache-dir /Users/me/rcloneCache 
--cache-info-age 1000h 
--dir-cache-time 1000h 
--buffer-size 256M 
--poll-interval 15s 
--transfers 8
--timeout 1h
--log-file /Users/me/Rclone.log 
--log-level INFO

The rclone config contents with secrets removed.

type = local

A log from the command with the -vv flag

❯ rclone mount /Volumes/NAS /Users/me/rcloneNAS --vfs-cache-mode full --buffer-size 256M --vfs-read-ahead 1000M --cache-chunk-size=256M --vfs-read-chunk-size 256M --vfs-cache-max-size 150G --vfs-cache-max-age 336h --cache-dir /Users/me/rcloneCache --dir-cache-time 1000h --cache-info-age 1000h --poll-interval 15s --write-back-cache --transfers 8 --timeout 1h --log-file /Users/me/Rclone.log --log-level INFO -vv


This didn't log out anything?

Footnote: It looks like this is what Cache-FS or cachefilesd does on Linux. I'm not sure if I'm being overkill for trying to setup something similar with rclone mount. The only alternative would be having a docker running Linux in the background and mount it on Mac OS. I'd rather avoid the docker overhead.

hello and welcome to the forum,

these flags are for the deprecated cache remote, can remove them

for debug output
--log-level DEBUG

the mount settings look ok.

as a side note, might test tailscale on the truenas and laptop, instead of traditional vpn.

Hey thank you. I've removed the deprecated flags. I'm using ZeroTier for my VPN, I think it's very similar to Tailscale, it's also based on Wireguard.

Do you know if pooling is indeed not supported when using type = local? I need to use local source directory because my SMB share is mounted to it, it looks like the only way to have a "remote" would be using SFTP instead of SMB.

good question,
as i do not use any remotes using polling, i am sure there are more answers to be shared.

for this local remote

type = local

for rclone backend features local:, the output includes ChangeNotify is false.
so local remotes do not support polling

"Features": {
                "About": true,
                "BucketBased": false,
                "BucketBasedRootOK": false,
                "CanHaveEmptyDirectories": true,
                "CaseInsensitive": true,
                "ChangeNotify": false,

as for sftp,
hopefully my example above is complete enough; to answer your own question.
if not, let me know

and there is the command, rclone test changenotify

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