Mount SMB share from external TrueNas server on Jail in another TrueNas server

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
I have two Truenas fileservers and several Windows Servers and machines. They are all Joined in a common domain controlled / managed by a Windows 2016 Server. I want to have access to SMB shares Receding on NAS2 in a TNAS1 Jail.

I first tried to mount outside the Jail as follows but no success:

mount_smbfs -I OB-NAS-2 //ole@OB-NAS-2/extdata2 /mnt/NAS-2-MNT
Password:
mount_smbfs: unable to open connection: syserr = RPC struct is bad


there are several post about making external data available to Plex but nothing i can use to solve my problem.
I am sure this is a well known issue and would be glad if someone could tell me how to achieve this.
 
Joined
Jan 7, 2015
Messages
1,155
You have to mount it outside the jail on the host and pass that mounted directory to the jail.

So I do something like. If youll do smb switch from nfs. From server you want to mount on at SSH session. Edit the commands so they make sense to your system.

Code:
mount -t nfs 192.168.192.192:/mnt/tank/dataset/ /mnt/server1/directory
iocage stop JAIL
iocage fstab -a JAIL /mnt/server1/directory /mnt/tank/iocage/jails/plex/root/media/directory nullfs rw 0 0
iocage start JAIL


I just have the mount command run as a post init command so it mounts on boot.
 

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
You have to mount it outside the jail on the host and pass that mounted directory to the jail.

So I do something like. If youll do smb switch from nfs. From server you want to mount on at SSH session. Edit the commands so they make sense to your system.

Code:
mount -t nfs 192.168.192.192:/mnt/tank/dataset/ /mnt/server1/directory
iocage stop JAIL
iocage fstab -a JAIL /mnt/server1/directory /mnt/tank/iocage/jails/plex/root/media/directory nullfs rw 0 0
iocage start JAIL


I just have the mount command run as a post init command so it mounts on boot.

What do you mean with "do SMB switch from nfs". Can you show me the correct mount syntax?
Why is not mount_smbfs work?
 

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
It seems that the mount_smbfs only work with SMB1... I added suport to SMB1 then the error changed to a autentication error... I wonder if the fact that both servers have joined a domain is an issue?
 
Last edited:

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
Seems I am talking to myself but I did make it work (but with promting for the password) and I am posting it since there seems to be a few that strugles with this :

mount_smbfs -I <smb server IP> -U <windows user> -W <windows domain> "//<smb server net bios name>/smb-share" mountpoint

I will introduce password encrypted in a file and post when this is done.

As mentioned by John it is not allowed to mount the share inside the Jail. I therfore mountet the mountpoint using the Mount Points option in the Jail menu.. This worked but the system crashed and I had to master boot... Need to look further into this..

Realy NO ONE who has some deeper understanding of this issue... ????
 
Last edited:

Selassie

Dabbler
Joined
Jun 22, 2018
Messages
46
Seems I am talking to myself but I did make it work (but with promting for the password) and I am posting it since there seems to be a few that strugles with this :

mount_smbfs -I <smb server IP> -U <windows user> -W <windows domain> "//<smb server net bios name>/smb-share" mountpoint

I will introduce password encrypted in a file and post when this is done.

As mentioned by John it is not allowed to mount the share inside the Jail. I therfore mountet the mountpoint using the Mount Points option in the Jail menu.. This worked but the system crashed and I had to master boot... Need to look further into this..

Realy NO ONE who has some deeper understanding of this issue... ????
Elo, I am trying to solve the same problem, mounting an external share but into Truenas Scale, without much luck and not officially supported by the Truenas team either.
 
Top