Mount external NFS shares in TrueNAS SCALE

patmage

Dabbler
Joined
Oct 21, 2016
Messages
12
Has anyone found a reboot/update friendly solution to this? I have two TrueNAS devices and would like to be able to access a dataset on one from a TrueChart app on the other.

Edit: I made an empty folder in one of my datasets and then created an Init/Shutdown Script that just runs command "mount -t nfs <remotehost>:<remotePath> <localPath>" and that seems like it is going to work for me. Also make sure to uncheck the auto permissions when adding the additional storage to the App.
 
Last edited:

ChaosBlades

Contributor
Joined
Jul 4, 2015
Messages
137
This seems like a reasonable thing to want. I guess Core has the same issue. I thought you could just use fstab in a jail but looking into it that is blocked due to rpcbind.

I was going to use a test machine to test my docker containers on SCALE before my main server gets converted from Core but I guess that plan is out of the window. I need to access files on my main TrueNAS Core system to do that properly.
 

Daniels25143

Dabbler
Joined
Dec 23, 2016
Messages
23
Tried the init script. The script created a folder and then mounted the NFS share inside the folder. When I activated the init script, nothing happened under boot. Ran the script manually, and everything worked, except that the mount did fail more often than not.
I used the same method to mount a SMB share at boot. Check that the "When" setting is configured to postinit, that seemed to work for me.
 

Selassie

Dabbler
Joined
Jun 22, 2018
Messages
46
Has anyone found a reboot/update friendly solution to this? I have two TrueNAS devices and would like to be able to access a dataset on one from a TrueChart app on the other.

Edit: I made an empty folder in one of my datasets and then created an Init/Shutdown Script that just runs command "mount -t nfs <remotehost>:<remotePath> <localPath>" and that seems like it is going to work for me. Also make sure to uncheck the auto permissions when adding the additional storage to the App.
This is exactly what I am trying to do as well, I have my storage on Truenas Core and would like to run my apps from Truenas Scale, but the apps need access to read and write to the storage on the Truenas Core machine. I would like to map some shares as a mount point so they can be seen and mapped within the container as a path to read or write to. Apps like Plex, Sonarr, Radarr etc.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Though it's currently not (officially) supported it's important to note here that Sonarr and Radarr specifically, have known issues when having their databases on NFS shares.

That's also the reason why we opted not to make NFS support a priority within our project for the first release of SCALE :)
 

Selassie

Dabbler
Joined
Jun 22, 2018
Messages
46
Though it's currently not (officially) supported it's important to note here that Sonarr and Radarr specifically, have known issues when having their databases on NFS shares.

That's also the reason why we opted not to make NFS support a priority within our project for the first release of SCALE :)
Noted, thanks for the update, I was not aware of this. Q. Can the same thing be done with SMB share from an external or Truenas core machine or is that also not supported?
 
Last edited:

bitbit

Dabbler
Joined
Feb 22, 2022
Messages
13
Here's a one-line Init command to mount an NFS share at boot. Adjust to suit your needs. Cheers!
Code:
mkdir -p /mnt/media && echo "$NFS_HOST:/$NFS_PATH /mnt/media nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0" >> /etc/fstab && mount -a
 

Selassie

Dabbler
Joined
Jun 22, 2018
Messages
46
Here's a one-line Init command to mount an NFS share at boot. Adjust to suit your needs. Cheers!
Code:
mkdir -p /mnt/media && echo "$NFS_HOST:/$NFS_PATH /mnt/media nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0" >> /etc/fstab && mount -a
Thanks I will give it a try
 
Top