Installing Plex Media Server in a FreeNAS jail is very simple, but not always clear without a little bit of checking Google. I started with the same instructions most people follow from the FreeNAS forums – (Tutorial) How To Install Plex in a FreeNAS 9.3 Jail (Updated) – although I ran into a somewhat common situation while adding media access to the jail.
Follow all the instructions in the tutorial for creating your jail and adding the Plex Media Server plugin – up to:
service plexmediaserver start
The plugin that was initially installed was version 1.4 and at the time I found that 1.9.3 was available, so I reran the update command to update and take care of a few new dependencies:
pkg update && pkg upgrade -y
At this point – you have Plex installed and updated, but there’s not a lot going on without access to your libraries. Now all that’s left is to add access to your media – which can be done from the command line or from the GUI, which I found was a little quicker for me. In the tutorial, there’s simply a link to the FreeNAS documentation about adding storage — 188.8.131.52. Add Storage. Going through the screens step by step, you can add a “hook” back to your FreeNAS dataset and then add the directories to your Plex libraries. If you’re like me, you didn’t read the FreeNAS documentation close enough in regards to source and although the storage was added to the jail – you see that your storage shows “Mounted? No” <picture needed> and isn’t available to Plex. A little closer reading of the source description shows what’s going on:
This directory must reside outside of the volume or dataset being used by the jail. This is why it is recommended to create a separate dataset to store jails, so that the dataset holding the jails will always be separate from any datasets used for storage on the FreeNAS® system.
To resolve this – simply point your source down one level. In my case, instead of the whole CIFS share, I created new folders for each library and pointed them individually and the storage mounted correctly. I added the new directories to the Plex library and was streaming in no time.