iocage, plex, and adding storage

Michael De Cou

Explorer
Joined
Aug 12, 2016
Messages
50
Hi all,

I have just taken the plunge and abandoned Warden for iocage. I have gotten my plex jail setup, but I ran into an issue when adding storage. In plex, when adding media libraries, the "browse for media" function only allows for browsing starting at the following location:

"/usr/local/plexdata-plexpass/Plex Media Server"

So... Naturally I am trying to add storage to the iocage jail using fstab, targetting a "Media" folder in the above location. The folder is at:

/usr/local/plexdata-plexpass/Plex Media Server/Media

Through much digging, I have found what i believe to be the correct syntax to add this in fstab, replacing the spaces with "\040". The entry is able to be added, however, when I start the jail, i get an error stating that the mount failed because the filename is too long. The entry in fstab is as follows:

/mnt/PROD/Plex\040Media /mnt/iocage/jails/Plexmediaserver_1/root/usr/local/plexdata-plexpass/Plex\040Media\040Server/Media nullfs ro 0 0

Now... If I shorten it, and try to mount in a "Media" folder at a lower level, everything works fine... I just can't browse to the folder because Plex only browses folders starting in the location noted above.

What i would like to know is:
1. What is the max length of the target in fstab ?
2. Is there a way to allow plex to browse folders starting at /root/ ?

Thanks for any help.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I could be wrong, and someone else might respond who has personal experience but I think Plex made some changes or maybe it was on the FreeNAS side where you had to manually enter the path in the plex interface. Is that what you are referring to?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633

adamtaro

Dabbler
Joined
Jan 7, 2017
Messages
14
2. Is there a way to allow plex to browse folders starting at /root/ ?

Thanks for any help.

There was, but it looks like it's subject to this bug, which didn't get enough momentum.
https://redmine.ixsystems.com/issues/24082

I just tried the suggested step
Code:
iocage set enforce_statfs=0 plexjail
... and restarted, but failed to see a return to the old behavior I was used to, where I could in fact browse from the root folder.
 
Last edited:

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Solution!

You can shorten the path after Plex\040Media\040Server\PM to mean parents movies for example. Then add the library back. Shortening the /Media/etc/etc helped and it's working.
 

Philip Robar

Contributor
Joined
Jun 10, 2014
Messages
116
For as long as I can remember Plex has allowed you browse it's jail's root directory. When you click on "BROWSE FOR MEDIA FOLDER" when adding a folder to a library you get a dialog box that defaults to the top of the Plex installation, but right below the picture of a house and the word Plex is a picture of a folder with the character '/' next to it. If you select that lower entry you'll be taken to the jail's root directory. I mount my media below the "media" directory to work around the path limit problem.

BTW, the path length problem is due to versions of FreeBSD prior to 12 having an fstab path length limit of 88 characters. When you add the overhead of iocages, you effectively have a path limit of 28 characters. The FreeNAS plugin works around this limit, by installing Plex into "/Plex Media Server" instead of the much longer path that the pkg uses:

iocage fstab entries have effective maximum path length of 28 characters
 
Top