Plex Installed on Freenas accessing network drive

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
Hello All,

I have a situation that I have not been able to resolve or know if it can be the way I want. I have installed Freenas 11.2 and running Plex in a jail successfully. I have the local storage working properly and using SAMBA to copy files to the dataset. But what I would also like to do in Plex is do what I was able to do when I was running Plex server on my Windows PC before, which was by mapping a drive on the PC to the readynas that is used only for storage.

Since Plex is installed in a jail and the mounted datasets are the only accessible directories in Plex Server I am not able to do what I was accustomed to doing before inside of Plex's 'Add Folder' under Movies or TV Shows, for example " //readynas/videos/movies" I was wanting or hoping to continue to use the readynas as another storage device and let Plex access it and the local datasets on the Freenas simultaneously (like I could do on the Windows Plex Media Server. I am just not sure how to do this or if it is possible since "mapping a drive" is not an option on Freenas. I suspect I might be able to do a symlink or bind-link and then add that to the mount in the jail. But I am not quite sure how to do this. Am I not seeing the best way to do this?

I know most would say just use the one data source that being on freenas but I am not ready to let the 4 TB I have on the readynas go or transferring it over to start eating up my Freenas storage. Thank you and I look forward to any assistance and appreciate all the help and guidance these forums have already provided with my installs so far.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
So you want to map a network drive inside the Plex jail from your other NAS? Couldn't you make a NFS or SMB share on the other NAS and mount it inside the Plex jail? Once mounted you can access the data and add it to a library in Plex.
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
Hi Mannekino, Yes I want to access the OLD NAS (Readynas) on the NEW NEW (Freenas) In theory I think it should be that simple but I have not been able to get outside of the NEW Freenas box, I can't enter the IP address or \\OLD_NAS or anything like that to see it. I could totally be over complicating it and not seeing what is right in front of my face though. Mapping is a Windows term so I guess I just don't know how to map, access or talk to a network share on the Freenas.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
It's been a while since I've done this but it shouldn't be that difficult.

Basically you need to be looking at using the command mount_smbfs that would be the equivelant of "mapping" network drive on a FreeNAS server like you do on Windows. You can test the connection using something like smbutil.

https://www.freebsd.org/cgi/man.cgi?mount_smbfs(8)

It is also possible to mount the SMB share on startup by putting it into fstab but I'm not sure if that will work with a jail.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
It's been a while since I've done this but it shouldn't be that difficult.

Basically you need to be looking at using the command mount_smbfs that would be the equivelant of "mapping" network drive on a FreeNAS server like you do on Windows. You can test the connection using something like smbutil.

https://www.freebsd.org/cgi/man.cgi?mount_smbfs(8)

It is also possible to mount the SMB share on startup by putting it into fstab but I'm not sure if that will work with a jail.

Thank you for that direction, not one I have checked on yet. Would seem a little more elegant than a symlink if it gets me to where I need I guess.
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
First, most important thing for everyone to always post is what version of FreeNAS you are asking about and if it is a plugin jail and if it was created in iocage or warden.

Updated Forum Rules 12/5/18
https://forums.freenas.org/index.php?threads/updated-forum-rules-12-5-18.45124/
Thanks Chris but pretty sure I did all those things. Freenas 11.2, jail and just assumed the only way to get a iocage was from a plugin, but I am new to this, don't even know what a warden is not heard that term in any of the tutorials I have read or watched.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Hmm I'm trying my own suggestions at the moment but I'm getting some errors. Seems like the kernel module "smbfs" is not loaded. Not sure how to proceed.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Hmm I'm trying my own suggestions at the moment but I'm getting some errors. Seems like the kernel module "smbfs" is not loaded. Not sure how to proceed.
You can mount it from within the jail. You just need to open a terminal to the jail and it should work
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
You can mount it from within the jail. You just need to open a terminal to the jail and it should work
If done from terminal it would only stay open until a restart, is that correct? I am still trying to figure out the syntax to use, as I said totally new to this.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If done from terminal it would only stay open until a restart, is that correct? I am still trying to figure out the syntax to use, as I said totally new to this.
when you open a terminal into the jail, it is like you are using a different installation of the OS from the one that FreeNAS is running on.
You can basically treat the jail as a BSD system that has no GUI and follow instructions like this to mount a remote smb share at boot:
https://forums.freebsd.org/threads/mount-samba-share-automatically-on-boot.20523/
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
PS. configs done in config files within the jail are persistent within the jail, like it is a separate system.
It is true that changes made to config files in the host FreeNAS are NOT persistent because many of the config files for FreeNAS are generated at boot based on the content of the config.db which is configured by the FreeNAS GUI.
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
I feel like this is what I need, but just not figured out how to do it yet. Thanks so much for your help and I will report back if I get it or just can't get it. ;)
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
I have the share that I want wide open, so no password required. Could I just put
Code:
//NAS-JJM/Videos /readynas smbfs rw,-N

or even just the IP address to the OLD NAS? At this point whatever I try it says No such file or directory

and would I just put that here?

Code:
root@freenas[/mnt/JailPool/iocage/jails/plex/root/mnt]#
 
Last edited:

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
You can mount it from within the jail. You just need to open a terminal to the jail and it should work

I haven't been able to get my idea to work, first I got this error message (I tried both inside the jail and on the server itself)

Code:
smb_lib_init: can't find kernel module 

I looked up this error message and found that the kernel module wasn't loaded so I tried kldload smbfs

Then I tried again, I got these errors inside the jail:
Code:
root@plex:~ # mount_smbfs -I 192.168.178.10 //[user]@freeas-test/testing /mnt/testing/
mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower): syserr = Operation not permitted

Code:
root@plex:~ # smbutil login //[user]@freenas-test/testing
smbutil: can not setup kernel iconv table (ISO8859-1:tolower): syserr = Operation not permitted

And on the FreeNAS server outside the jail I get this:
Code:
root@freenas[~]# mount_smbfs -I 192.168.178.10 //[user]@freeas-test/testing /mnt/testing/
Password:
mount_smbfs: unable to open connection: syserr = RPC struct is bad

Code:
root@freenas[~]# smbutil login //[user]@FreeNAS-test/testing
Password:
smbutil: unable to open connection: syserr = RPC struct is bad
smbutil: could not login to server FREENAS-TEST: syserr = RPC struct is bad
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
Yeah, I have not been able to get this still. embarrassed to say how many hours I messed with it all thinking a light may go on in my head and all of a sudden "get it" like I used to working with stuff...No luck afraid I am just not knowledgeable enough or even comfortable enough in shell to know what I am doing. Started reading how I could really mess stuff up messing around in fstab so took a break from it and now going to start trying again, even though just spending another $150 bucks and adding another 6TB to the volume is starting to sound a lot easier.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Have you been able to mount the Samba share from your other NAS? You got any error messages like I did. I haven't been able to solve those myself.
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
No, I have not succeeded and not even came close. I get can't connect errors (and SMB is ON) and I get line errors when I mess around in fstab too much.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
I haven't made any progress either. I did some further reading and did manage to find a comment that mount_smbfs requires support for v1 login so I ticked that box in the configuration of my FreeNAS test server but still got the same error.

Hoping for someone else to help out here, not that I need it, but I would like to find a solution for something that seems like a simple problem. Mouting a SMB share in FreeNAS or in a jail could be useful for moving files from some old share to FreeNAS.
 

JayM

Dabbler
Joined
Feb 10, 2019
Messages
11
Yeah I have tried Reddit too and everyone says "Oh yeah no problem!" But won't comment any further :( Found some YouTube videos doing it on Linux but does not seem to carry over to unix / Freenas.
 
Last edited:
Top