I recent assembled a new NAS for my home network using Freenas and PC hardware. File sharing is working with my Windows 10 and IOS clients. But my real purpose in assembling this new device was to create a Media Server for my home. So I installed the Plex Plugin for that purpose. I followed the steps to set a mount point for the Plex Jail in Freenas, for a sample of Music files I copied to the share. But my Music Library in Plex remains empty. My guess is that I have something wrong in the Source and Destination paths in the Plex Jail, because my destination directory was not selectable in the Library setup dialog on Plex. The Source is set to “/mnt/PATNAS2/PATNAS2_MEDIA” and the Destination is set to “/mnt/PATNAS2/iocage/jails/plex/root/Plex Media Server/patmedia”. The “patmedia” folder is grayed out in the Plex library edit dialog. I am out of ideas to resolve this and get my music library populated in the Plex Media Server.
Does ‘Plex Media Server/patmedia’ exist in the Plex iocage? If it does exist does Plex have permission to access it? Default user and group are plex/plex.
Thank you for the prompt response, I would really like to make this Freenas-Plex thing work. Where in Freenas shall I look to answer your question " Does Plex Media Server/patmedia exist in Plex iocage? I found iocage in Pools in Freenass and no Plex Media Server/patmedia is not there. But I suspect that’s not what you are asking. Patience please, I have no experience in Linux, but years of building PCs and Networks. I am better with the hardware than software. So where do I need to be looking to answer your question?
From the FreeNAS user interface go to Shell and enter, iocage list to get a list of installed iocages. You should see your Plex iocage instance listed.
Now enter iocage console plex where ‘plex’ is the name of your Plex iocage instance. This will connect you to your Plex iocage instance.
Next, let’s check to see if ‘Plex Media Server/patmedia’ exists. Enter, ls -la “/Plex Media Server/patmedia”. You should get the following message, ‘ls: /Plex Media Server/patmedia: no such file or directory’.
Since we don’t have the directory let’s create it. Enter mkdir -p “/Plex Media Server/patmedia” and hit enter. Give Plex ownership of this folder enter, chown -R plex:plex “/Plex Media Server” and hit enter.
Exit Plex iocage enter, exit and hit enter.
Now let’s make sure Plex iocage can access the FreeNAS dataset where your media is stored. To do this, enter, iocage fstab -a plex '/mnt/PATNAS2/PATNAS2_MEDIA “/Plex Media Server/patmedia” nullfs rw 0 0’
Restart Plex iocage by entering, iocage restart plex where ‘plex’ is the name of your Plex instance.
Now go to Plex web interface and try adding library again. You should now be able to access and add your music library.
Well “Plex Media Server/patmedia” did not exist. So, I follow your instructions and created it and gave Plex ownership, without any error feedback from the shell.
But I am stuck at the next step, because the iocage fstab command returns the error, “please specify a valid fstab entry” Can you tell what went wrong from this screen shot?
Add double quotes around destination path, “/Plex Media Server/patmedia” and try again. If there is one or more spaces in a path you need to add quotes.
Quotes added and the command ran no errors reported. I went to the Plex Web interface and patmedia was available for selection, and all the subdirectories I create in PATNAS2_MEDIA where there to select. I choose the music subdirectory and Plex got busy populating my Music Library. Empty Library problem solved, Thank you.
One further concern, will these changes that we did using commands in the shell survive a reboot? I ask because when I go to the Freenas Shell, it warns that “settings changed through the CLI are not written to the configuration database and will be reset upon reboot.”
All of my configurations are done via CLI and they persist reboots. That said, I’ve never used the Shell in the FreeNAS UI before so perhaps this limitation only applies there.
I can test this tomorrow to see if modifications to the config persist reboots.