參考 rclone 的 mount 文檔性含,命令如下:
/usr/bin/rclone mount onedrive: /mnt/onedrive --daemon --vfs-cache-mode writes
--vfs-cache-mode 是控制 NFS 的緩存選項,可以讓 NFS 更像是本地文件系統(tǒng)厘线,它有下面的選項:
--cache-dir string Directory rclone will use for caching.
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
--vfs-cache-mode string Cache mode off|minimal|writes|full (default "off")
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects. (default 1m0s)
每一種方式都有利有弊识腿,官方文檔很詳細(xì),可以根據(jù)場景選擇合適的方式造壮。
和 fuse 掛載方式一樣渡讼,rclone 也可以指定用戶和用戶組,參數(shù)分別是 --uid 和 --gid耳璧。