Warden and Iocage jails

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
I have a Plex jail created in Freenas 9x. Now in Freenas 11.2u8, I haven't been able to update plex unless I create plex in iocage. I have over 4k movies and about 300 TV shows. I have looked at videos on how to create iocage jails for plex, but no videos on how to tranfer or migrate all of my media safely. I have 1 question, can I create a Plex jail in iogage with the same mnt points as the plex in warden jail.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I'd like to think your media is stored outside of the jail, so switching between warden and iocage jails should have no impact on the media itself. What you probably need to worry about (assuming you want to keep your library settings, watch lists, etc.) is the database and metadata stored in the Plex jail.

I haven't used Plex now for almost 2 years (I don't miss it anymore, and actually prefer emby now) so you'll need to do a little research, but what you need to do is move the Plex database outside of the jail as a first step. Based on this > https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/ you want to be moving /mnt/<pool_name>/jails/<plex_jail_name>/usr/local/plexdata/ to it's own dataset on the pool (e.g. /mnt/<pool_name>/plexdata)

At this point, your data is separated from the jail and means you can update/delete/recreate the jail without worrying about your data. You can also back it up easily.

When you create the iocage jail, and get it up and running, you simply mount your plexdata dataset along with the media folders into the jail, and it should be exactly as it was in a warden jail.

Two things made my experience of using FreeNAS significantly easier. Moving user data outside of the jails into their own dataset was the first. Having a jail managing SSL certificates and reverse-proxying to the services was the other. Neither is that complicated, and you'll find pretty much all you need to do them in the forums somewhere.

Good luck.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Basically, you don't have to move the media at all.

If you set up Plex in a new iocage jail, you can copy the Plex database from the old jail to the new jail. Do an internet search on the Plex forums to find advice - it is not difficult, but you need to know where the database is in the warden jail and where it is in the iocage jail so that you copy the database to the right place. Take some time to figure this out.

Since your media should be on datasets that are outside of the jail, they won't be affected if you try to create the new jail and mess something up. At the very worst, you might have to reset your Plex preferences and mount-points, then re-index the media - but that is not likely.

Be patient, and don't panic if you do something wrong.
 

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
set up plex in iocage, plex plays back movies, and shows my 4500 movies, but no metadata. I have a static ip for my plex server. tried to turn on vnet and that did not work. my plex server would not show up. turned off vnet and server back up still no metadata. I am running freenas 11.2u8. any ideas why metadata won't download. When I was using plex in warden jail, metadata was in all movies.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Change to a shell inside your Plex jail and check basic networking - local LAN, default gateway, name resolution ...
Generally VNET is the preferred setup nowadays. Need to assign the correct physical interface for the bridge magic to work as intended.

HTH,
Patrick
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
1. Configure your jail with VNET (and DHCP if you have a DHCP server in your LAN).
2. Logon via SSH to your FreeNAS as root.
3. Use ifconfig to check if the jail is connected to the same bridge as your physical network interface.
4. Use iocage console <jailname> to change into your jail.
5. Use ifconfig to check if your jail received an IP address via DHCP or your static address is active if you used that.
6. Try to ping stuff on the local net.
7. Use netstat -rn to find out if you have default router configured.
8. Try to ping that default router.
9. Try to ping 8.8.8.8.
10. Use cat /etc/resolv.conf to check if name resolution is configured.
11. Try to ping www.google.com.

If any of these steps fails, report back ;)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Set the allow_raw_sockets option for your jail.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
You need to have VNET configured for Plex to work properly. Something is not set up properly in your networking.
 

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
redid the pings from above, and all worked. tried to enable vnet and plex was not found. Unchecked vnet and plex was back. Can get movies and play them but still no metadata. On warden jail everything was fine except I could not update server.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You did successfully get through all my steps with VNET?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The point of my steps is entirely to debug and get the VNET config working.
And I wrote that down as step 1. If you do something entirely different how do you expect your pings to provide any useful info?
Please do as I wrote or I won't be able to help.

Generally you want VNET nowadays unless you have a very specific reason not to use it.
 

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
i am attaching screen shots. I hope this helps.
 

Attachments

  • Screenshot (44).png
    Screenshot (44).png
    181.9 KB · Views: 239
  • Screenshot (45).png
    Screenshot (45).png
    181.7 KB · Views: 248
  • Screenshot (46).png
    Screenshot (46).png
    174.9 KB · Views: 249
  • Screenshot (47).png
    Screenshot (47).png
    177.3 KB · Views: 246
  • Screenshot (48).png
    Screenshot (48).png
    180 KB · Views: 279

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Ssh into your box, copy and paste text, please. Screenshots are useless ...
That was point 2. of my list.

I don't get what is so hard about this. You complained and sought help that your jail was not working with VNET. I am trying to help. For that I need very specific information about your system when the jail is active with VNET. Please just follow the steps I outlined in (as I see it) great detail and post the results.
 

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
I appologize, I am just a dabbler ruuning my server for plex so my family can watch from anywhere. I decided to edit my jail for dhcp instead of static ip with vnet and berkly checked. Plex sees my server and is now downlading all metadata. Thank you for your help.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I am confident that something was not set up properly in your networking. It is not uncommon to miss a parameter when setting network parameters manually. Good that you got it running with DHCP. Take care.
 

sakn54

Dabbler
Joined
Jan 19, 2014
Messages
48
Need some help. After I got my plex in iocage jails from warden, I went to do the same on my other freenas server running all tv shows. I followed the steps I used doing my plex movies. Everything seemed to work. Plex was loading all the tv shows. Then everthing vanished from plex. I reviewed the add folders in plex, but I could find nothing. I looked at the shares in freenas and couldn't figure it out. Then all of sudden I lost access to my tv shows folder in windows 10. Can someone please help.
 
Top