Adding NFS mount from external NFS share to Truenas App

Hello,

I have just created myself a truenas scale storage server that i’m really stoked about. I have run into an issue though that is a challenge for me. I would like to mount my old nfs export that is on my old storage server (linux machine not truenas) to the truenas scale machine which is easy enough but I cannot include the nfs share inside of a jellyfin container. I have scoured the internet and in theory it should be possible to create maybe some kind of container with the nfs share and perhaps attach that to the app container. To be honest I don’t really know kubernetes at all and I am looking for some detailed direction in how I could achieve this. Otherwise the app eco system becomes less interesting if I can oly use datasets inside a pool on the machine.

Thanks!

Doesn’t Jellyfin have an option to mount network shares from the GUI?

Also, the way TruNAS does containers is stupid and you might consider running docker natively:

This gives containers native access to your host device so you can easily create bind mounts and volumes.

1 Like

Yes thank you I saw this article and this is what I will end up doing although it just seems like it is a design flaw in truenas scale to not have the option of making other volumes available to them outside the pool

Lookup “init script”.

You can setup TrueNAS to run your script on startup and your script can run the mount commands.

Client filesystems are probably not in the UI directly, because they’re “hard” to deal with, because there’s lots of concerns and every network filesystem does most of these things differently.
There are interesting implications wrt to filesystems client side, that you don’t need to worry about as much when providing a server that stores the data and/or that serves or exports files.
e.g. with permissions and containers/namespaces - which UIDs do you use, do you do any uid mapping, do you trust executable or setuid files… But also there’s more mundane issues e.g. how do you deal with Unicode, how do you deal with symlinks, what do you do when network flakes out - do you wait forever or return an error after a timeout, do you retry or not and how often?

With your own script, you get to choose these things yourself.

1 Like

I appreciate your response but this does not at all respond to my question of how to add external nfs mounts to scale apps.

  1. Write an init script to mount an NFS export to somewhere local to TrueNAS (search true scale documentation and their forums for pointers, something like Mount external NFS shares in TrueNAS SCALE | TrueNAS Community or Docs Hub | Init/Shutdown Scripts ).

  2. When you launch a docker image, add an additional “Host Path Volume” pointed at wherever your script mounted the remote NFS.

Except that this will not work, the apps from the app repositories do not allow you to access mounts on the scale host outside the scale datasets. Im really disappoined to be honest to me it seems totally reasonable to expect that the scale apps can access resoources on the rest of my lan.

I also just realized that perhpas the issue is the jellyfin truenas trucharts app as I was able to create an emby instance and was able to mount and external nfs share there. In any case I am going to follow the guide above and do a docker portainer thing