How to mount truenas directory to second truenas

zeejb

Cadet
Joined
Jan 14, 2022
Messages
2
Hello there,

i'm a new truenas user and i wonder how i can make it possible so i can mount a directory of my first truenas (TN1) into from my second truenas (TN2).

TN1 is used as a network storage
TN2 is used for apps like plex, octoprint, etc

on TN1 i have a smb share so i can upload whatever i want from windows into TN1 share

i can't find anywhere how i can make a mount point connecting TN1/share to ex: TN2/mnt/tn1hared so i can easly make a mount point from my TN2 plex jail to TN2/mnt/tn1shared/plex and from TN2 octorpint jail to TN2/mnt/tn1shared/octoprint
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Scale or Core (and are they both running the same)?

if it's core (you're talking about jails)... then iocage fstab would seem to be the easiest way to set a mount for each jail.
 

Marcelofs1

Dabbler
Joined
Jul 17, 2015
Messages
24
Scale or Core (and are they both running the same)?

if it's core (you're talking about jails)... then iocage fstab would seem to be the easiest way to set a mount for each jail.
Hello. I've been searching forums for the last week on a very similar issue. I was able to create the mount points between the 2 TN (running TrueNAS-13.0-U1.1). I have a directory on TN2 that I have changed permission to all (777) and I am still getting "Permission Denied" when I try to mount using CLI.
From the TN1 GUI when I try to mount pointing to TN2 I got the message that the path is not found. From any windows machine on my network I can "see" and manage that storage so i know the SMB is running as expected.
I am not an expert on TrueNas/Linux/FreeBSD but I do know some basic concepts. I've been reading documentation and as suggested above, I could map using iocage fstab -a plex /mnt/TN1/TN2/Shows /media/TN2/Shows nullfs rw 0 0 but when I try to mount it fails.

I used to have both working fine but due a hardware failure I had to reconstruct TN2 and I installed TrueNAS CORE 13.0 and I could never reconnect them again. I have upgraded TN1 to 13.0 as well as I thought it might be some kind of compatibility issue but no success.
Any guidance would be great appreciated.
 
Last edited:

Alex_K

Explorer
Joined
Sep 4, 2016
Messages
64
SMB is more complicated and implementation change more from release to release. You could share the same directory/dataset via NFS between TrueNASes easier and stable.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
i can't find anywhere how i can make a mount point connecting TN1/share to ex: TN2/mnt/tn1hared so i can easly make a mount point from my TN2 plex jail to TN2/mnt/tn1shared/plex and from TN2 octorpint jail to TN2/mnt/tn1shared/octoprint
That's because this is an unsupported application--TrueNAS is a file server, not a client, and it has no GUI or middleware support for acting as a client. Thus the real solution is to consolidate the drives into a single server and call it a day--probably saving a few watts in the process.

But with that said, if you insist on trying to put a square peg into a round hole, NFS is likely going to be the best way to do it. You'll need to re-do the mount every time you restart the machine, though.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What problem are you trying to solve? Are you trying to centralize all the apps on TN2 and all the storage (i.e., persistent volumes for apps) on TN1?

If that's the case, don't try to have TN2 mount shares from TN1 to iocage fstab mount into the jails. Have the jails directly mount via SMB or NFS from TN1. NFS is likely to be more performant.

For iocage, it's better for the jail storage to be local. If you want all the storage on TN1 for your own convenience of having a single SMB mount point for uploading data, you can use SMB DFS to have shares on both TN1 and TN2 appear in a single share on TN1. See https://blog.udance.com.au/2019/03/19/freenas-and-samba-standalone-dfs/ on how to do that.
 

Marcelofs1

Dabbler
Joined
Jul 17, 2015
Messages
24
What problem are you trying to solve? Are you trying to centralize all the apps on TN2 and all the storage (i.e., persistent volumes for apps) on TN1?

If that's the case, don't try to have TN2 mount shares from TN1 to iocage fstab mount into the jails. Have the jails directly mount via SMB or NFS from TN1. NFS is likely to be more performant.

For iocage, it's better for the jail storage to be local. If you want all the storage on TN1 for your own convenience of having a single SMB mount point for uploading data, you can use SMB DFS to have shares on both TN1 and TN2 appear in a single share on TN1. See https://blog.udance.com.au/2019/03/19/freenas-and-samba-standalone-dfs/ on how to do that.
Thanks for the link. Will try and post the result here. I believe zeejb and I are just trying to expand the storage using 2 systems as the cost to upgrade individual HD's (let's say from 2TB to 8TB on a 10 disks setup) would be more cost effectivelly having one aditional storag with 8x2TB disks.
In my particular case, I have some spare disks and hw so I decided to built the second server long ago and it was running just fine. I had to replace the MB and the SSD OS running so I decided to built the TN2 from scratch. Got surprised by the "permission denied" despite if I use SMB or NFS share.
 

Marcelofs1

Dabbler
Joined
Jul 17, 2015
Messages
24
Thanks for the link. Will try and post the result here. I believe zeejb and I are just trying to expand the storage using 2 systems as the cost to upgrade individual HD's (let's say from 2TB to 8TB on a 10 disks setup) would be more cost effectivelly having one aditional storag with 8x2TB disks.
In my particular case, I have some spare disks and hw so I decided to built the second server long ago and it was running just fine. I had to replace the MB and the SSD OS running so I decided to built the TN2 from scratch. Got surprised by the "permission denied" despite if I use SMB or NFS share.
As promised, I have tried the solution and it didn't work. In this meantime I also tried also to narrow the network (changing the allow/denied network to connect) and playing around with a bunch of configuration without any success.
What puzzles me is I used to have this working using just the mount command. What seems (I am not an expert at all) when I got the "permission denied" message is that the mount command have reached the destination and it does not allow the user or member of the group to make the connection (even having all the permissions allowed - yes, I have set a chmod 777 to that folder for testing). No lucky. I am now wondering if there is another bug related to this but I do not have enough evidence to support that (if this is really a bug)
 
Top