How to add media on Windows share to plexmediaserver?

Status
Not open for further replies.

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
I have installed plex media server plugin on FreeNAS 9..2.1.8. Now I want to add media stored on Windows server to plex media library.

Unless I somehow mount the Windows share in plex media server jail, it would not be possible. I tried to use mount_smbfs command but I get an "operation is not permitted" error. Same mount_smbfs works fine in the FreeNAS shell.

I am assuming that mounting of Windows shares is not permitted in plex media server jail. Is there a way to add a media folder on Windows server to plex media server running on FreeNAS?

Thanks,
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can add storage to a jail using the giu. It's on the left menus options or read the manual.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
Actually I do not want to add storage to jail. I know how to do that. The question is that my media files are stored on a different server and I want to expose these media files to plex media server running in a jail. The idea is not to copy the media files to FreeNAS but use them from a separate location.
 

Pasquale61

Explorer
Joined
Oct 8, 2014
Messages
62
This may be dumb and I'm not sure if this is possible, but can you mount the share within the FreeNAS shell and then add this mount point to the jail?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You are going to need to install something like cifs-utils in the jail then make a network mount using cifs.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
This may be dumb and I'm not sure if this is possible, but can you mount the share within the FreeNAS shell and then add this mount point to the jail?

I mounted the Windows share within FreeNAS shell. As far as I understand the concept of a jail, a jail should not be able to access any resource outside of the jail. I will try though and report back. I cannot think of any way to do that. If you have any ideas, please let me know. I will Google to see if this can be done.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
You are going to need to install something like cifs-utils in the jail then make a network mount using cifs.

mount_smbfs is what I used to mount the Windows share in the FreeNAS shell. The command is available in the jail but keeps throwing an error "operation not permitted". I was hoping that since mount_smbfs works within FreeNAS shell, it will work inside jail, but it does not. I will try cifs-utils. In Red Hat, I can just use the mount command. FreeBSD is lot different.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
In redhat you still need to install samba and provide the cifs flag when you do the mount.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
Got it to work:

mount_smbfs -I 192.168.0.11 //"<User Name>"@<Windows Server Name>/tc_g /mnt/tc_g

Prompts for password. Enter <User Name>'s Windows password.

mount_nullfs /mnt/tc_g /mnt/MyVol/jails/plexmediaserver_1/mnt/tc_g

Where:
192.168.0.11=IP address of the Windows server
User Name=User account which has access to Windows share. If the name contains spaces, enclose it in double quotes
Windows Server Name=NetBIOS name of the Windows server
tc_g is the share on Windows server which holds the media files

Now the question is how to make it permanent so I will not get prompted for the password and the mounts would work across reboots? I tried adding entries to /etc/fstab and creating .nsmbrc file but they get erased on reboot.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You really shouldn't be using CIFS for Plex in a jail. There's a bunch of reasons why this is a bad idea. Besides, jails already have the ability to mount directories outside the jail inside the jail. Read up on the "Add Storage" feature.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
You really shouldn't be using CIFS for Plex in a jail. There's a bunch of reasons why this is a bad idea. Besides, jails already have the ability to mount directories outside the jail inside the jail. Read up on the "Add Storage" feature.

Sorry, I wasn't clear. I did these steps in the FreeNAS shell, not inside the jail. So, effectively, I have mounted a FreeNAS mount point inside a jail, which should not have any implications. The CIFS is mounted at the FreeNAS shell. Please let me know if you still feel it is a bad idea.

I am no expert on FreeNAS. Google search brought up a post (not on this forum) which suggested mounting a NFS share in this manner. I just substituted CIFS instead of NFS.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I honestly don't understand what you are doing. But, there is no reason to use *any* network protocol for sharing files when everything is local....
 

panz

Guru
Joined
May 24, 2013
Messages
556
Actually I do not want to add storage to jail. I know how to do that. The question is that my media files are stored on a different server and I want to expose these media files to plex media server running in a jail. The idea is not to copy the media files to FreeNAS but use them from a separate location.

You should install Plex on the Windows machine too. My Samsung Smart TV can add more than one Plex Server without complaining.

Why would you overload your network from the Windows machine to FreeNAS' Plex server if you can run Plex directly from the Windows machine?
 

Pasquale61

Explorer
Joined
Oct 8, 2014
Messages
62
You should install Plex on the Windows machine too. My Samsung Smart TV can add more than one Plex Server without complaining.

Why would you overload your network from the Windows machine to FreeNAS' Plex server if you can run Plex directly from the Windows machine?
I don't know his situation, but transcoding horsepower of either system might be one reason. You're right though, you can easily have multiple instances of Plex servers...and it just seems right to have your source content local where there are no network bottlenecks before transcoding...and then sent back out the network for viewing.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
You should install Plex on the Windows machine too. My Samsung Smart TV can add more than one Plex Server without complaining.

Why would you overload your network from the Windows machine to FreeNAS' Plex server if you can run Plex directly from the Windows machine?

a) The Windows Server has more storage capacity than FreeNAS. There are multiple USB drives attached.
b) There is plenty of bandwidth between FreeNAS and Windows server. They are on a gigabit wired connection.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
I don't know his situation, but transcoding horsepower of either system might be one reason. You're right though, you can easily have multiple instances of Plex servers...and it just seems right to have your source content local where there are no network bottlenecks before transcoding...and then sent back out the network for viewing.

There is no transcoding. Just storage capacity issues.
 

Arun Gupta

Dabbler
Joined
Dec 22, 2013
Messages
37
Thanks to all for responding. I will figure it out myself.
I honestly don't understand what you are doing. But, there is no reason to use *any* network protocol for sharing files when everything is local....

If you read the question carefully, the media is NOT local to FreeNAS.

Media Files (Windows Server) ---Network---Plex Media Server (FreeNAS)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yeah. I seemed to not get that the files aren't on the same machine as FreeNAS until I read panz reply. Sounds like you actually understand your situation just fine. ;)

The one thing I would do differently is I'd mount the mountpoint from inside the jail itself. If I'm not mistaken again, it sounds like you mounted the share from the FreeNAS shell. I'd do it inside the jail that way if you stop the jail the mount is unmounted and if you start the jail it's remounted. That could be handy if the mountpoint disconnects for some reason. Then you just stop and start the jail. ;)
 

sremick

Patron
Joined
Sep 24, 2014
Messages
323
You really shouldn't be using CIFS for Plex in a jail. There's a bunch of reasons why this is a bad idea. Besides, jails already have the ability to mount directories outside the jail inside the jail. Read up on the "Add Storage" feature.

I'm probably misunderstanding something here, so be gentle... but if this is the case, what manner would you suggest one use to move video files from varied-OS sources to the Plex jail? The video here advises using CIFS: http://www.freenas.org/about/videos.html (although when I set up my production server I'm going to manually set up Plex in a jail so it's more-easily upgraded. Something I learned by much reading of the forums. :) )
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So forget everything I've written above. I'll try to put it in a more organized manner...

*if* your plex jail and the movies are local to each other, you should use the "Add Storage" feature to provide the movies to the plex jail itself. Network protocols should be avoided whenever possible for a bunch of reasons, and if everything is local why not keep it local and avoid the network stack completely.

*if* your plex jail and movies aren't local to each other, you will have to mount a share from the movies server inside the jail. There's two ways to do this:

1. Mount the directory from the FreeNAS shell (or via /etc/fstab)
2. Mount the directory from the jail's shell (or via the jail's /etc/fstab).

You *can* do #1, but that's not recommended. #2 is better because it will mount and unmount as the jail is started and stopped. Also any custom setup in the FreeNAS' /etc/fstab (or other methods) will be lost on upgrades and you *really* shouldn't edit the FreeNAS files anyway.

Hopefully this makes things a little more clear.
 
Status
Not open for further replies.
Top