# Linux NFS Server with Rclone and local disk for cache

**URL:** <https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903>\
**Category:** Help and Support\
**Created:** [October 21, 2020, 12:19pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903 "2020-10-21T12:19:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 21, 2020, 12:19pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/1 "2020-10-21T12:19:33Z")

</div>

Been thinking for a while to set up a server with 5 ssd in raid 0.  
Mount rclone and put the cache directory on the ssd's then share it on nfs for other servers.

Point is that i want speed on this share for upload and download from the share. and if its not in the cache it will bee downloaded from the cloud storage.

Anyone running a setup like this? There will be lots of activity on this share.

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 23, 2020, 8:59am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/2 "2020-10-23T08:59:48Z")

</div>

Tried to make a nfs share now.

got this message:  
okt. 23 10:58:21 nfs-server rpc.mountd[1466]: authenticated mount request from 192.168.1.108:777 for /gdrive/pbs (/gdrive/pbs)  
okt. 23 10:58:21 nfs-server rpc.mountd[1466]: Cannot export /gdrive/pbs, possibly unsupported filesystem or fsid= required

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 24, 2020, 9:03am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/3 "2020-10-24T09:03:14Z")

</div>

See this page for adding an fsid / using nfsv4 which should hopefully solve the problem.

> <https://unix.stackexchange.com/questions/102617/having-trouble-exporting-fuse-via-nfs>

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 26, 2020, 1:36pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/4 "2020-10-26T13:36:36Z")

</div>

So this is my export file:

> /gdrive/backup 192.168.1.10(rw,sync,no\_root\_squash,no\_all\_squash,fsid=0)

And i cant write to it.

> root@vhost01:/mnt/pve/backup/test# touch test  
> touch: cannot touch 'test': Input/output error

Have anyone tested something like this before?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 26, 2020, 3:09pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/5 "2020-10-26T15:09:09Z")

</div>

Did you put `--allow-other` and possibly `--allow-root` on the `rclone mount`?

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 26, 2020, 3:41pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/6 "2020-10-26T15:41:12Z")

</div>

yes this is my mount string:

> rclone mount gcrypt: /gdrive --allow-other --allow-root --dir-cache-time 720h --poll-interval 15s --cache-dir=/cache --vfs-cache-mode full --vfs-cache-max-size 10G --vfs-cache-max-age 336h &

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 26, 2020, 3:48pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/7 "2020-10-26T15:48:54Z")

</div>

think this is a known problem:

> <https://github.com/rclone/rclone/issues/2115>
>
> What is the problem you are having with rclone?
> Hi, I have been playing around rclone + NFS on top of it....

Or are there anyone using a setup like this?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 26, 2020, 6:55pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/8 "2020-10-26T18:55:45Z")

</div>

Yes you are right, and I don't think we've figured it out yet.

Digging into the s3ql source might be helpful to figure out what the --nfs workarounds do.

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 26, 2020, 7:45pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/9 "2020-10-26T19:45:17Z")

</div>

OK, thanks. I can to some digging to se if i figure out something. In the mean time is there somewhere i can subscribe to get updates on this if its fixed?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 27, 2020, 11:33am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/10 "2020-10-27T11:33:27Z")

</div>

If you subscribe to the GitHub issue above, you'll get notification.

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [October 30, 2020, 10:25am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/11 "2020-10-30T10:25:27Z")

</div>

thanks to this fix [https://beta.rclone.org/branch/fix-2115-nfs/v1.54.0-beta.4869.bfcd4113c.fix-2115-nfs/](https://beta.rclone.org/branch/fix-2115-nfs/v1.54.0-beta.4869.bfcd4113c.fix-2115-nfs/)  
NFS Share is now possible and seems to be working very well.

Also is there any suggestion of how this should be mounted?

My current mount:

> rclone mount gcrypt: /gdrive --allow-other --dir-cache-time 720h --poll-interval 15s --cache-dir=/cache --vfs-cache-mode full --vfs-cache-max-size 1024G --vfs-cache-max-age 3360h --write-back-cache --vfs-write-wait 60m &  
> Thougts:

Some of my thoughts here are:  
vfs-cache-max-age should be forever and when cache disk is full the least used file should be removed for creating of new files. this because of saving bandwidth and increase of speed.

write back cache and vfs cache wait is for when adding files should go very fast and rclone can work quite in background uploading files.

Gladly to for input and thoughts on this.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 30, 2020, 1:04pm UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/12 "2020-10-30T13:04:28Z")

</div>

I've merged the fix for the NFS problems to [the latest beta](https://beta.rclone.org) now.

> [@torstein](#):
>
> My current mount:
> 
> > rclone mount gcrypt: /gdrive --allow-other --dir-cache-time 720h --poll-interval 15s --cache-dir=/cache --vfs-cache-mode full --vfs-cache-max-size 1024G --vfs-cache-max-age 3360h --write-back-cache --vfs-write-wait 60m &

This is too big `--vfs-write-wait 60m` - you should probably leave it at the default

`--write-back-cache` controls kernel caching rather than anything else. I'm not sure how important it is.

The other settings look fine 🙂

---

<div class="post-metadata">

**Author:** ![torstein](https://forum.rclone.org/user_avatar/forum.rclone.org/torstein/32/8350_2.png) [@torstein](https://forum.rclone.org/u/torstein)\
**Post date:** [November 20, 2020, 10:07am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/13 "2020-11-20T10:07:09Z")

</div>

Been using this setup for a while now and have to say it works great if other need to use this by nfs server. I have 10Gbit network connection and seen it go up to 4gbit some times. So it works perfect.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [January 20, 2021, 6:07am UTC](https://forum.rclone.org/t/linux-nfs-server-with-rclone-and-local-disk-for-cache/19903/14 "2021-01-20T06:07:14Z")

</div>

Closed on January 20, 2021, 6:07am UTC

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