Moving from Jails to IOCAGE

Status
Not open for further replies.

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
After I upgraded my FN server to 11.1 over the weekend I thought I might migrate my PMC server to an IOCAGE installation. Pentaflake offers a very detailed resource (thank you very much for that) but as I am still learning how all this works, I do have a few questions:

Creation of the IOCAGE applications seems to only be available on the "root?" command console (is that the right thing to call it?) and not on a Jail that is spun up. Is this the case or is there something I am missing? I read the config guide for 11.1, but I am not sure I totally understood it.

I followed the steps in Pentaflake's resource guide until I got to this line:

iocage fstab -a plex /mnt/tank1/apps/plex /config nullfs rw 0 0
which I rewrote to match my settings:
iocage fstab -a plex /mnt/tank/apps/plex /config nullfs rw 0 0

But it puked on me saying that the destination folder did not exist.

My question is, is this line for creating the application folder for the IOCAGE, and is it like the application folder of the Jails that are created from the jail GUI? If so, how do I modify this correctly to drop the application onto the /mnt/jail/[IOCAGE}/plex-media-server (or whatever I call it) so it resides on the SSD that I installed for this purpose? I tried a couple of times to change the mount location but I always got an error. The next line:
iocage fstab -a plex /mnt/tank/media /mnt/video nullfs ro 0 0
worked like a champ.

Finally, after creating the IOCAGE, where do I go in the GUI to monitor/manage it? It doesn't show up on the plugin, jail or VM page.

Thanks in advance for the help
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
I am still not getting very far with this. The iocage does not show up under Jails in the GUI, and I am getting errors every time I run these commands.

correct me if I'm wrong but this command:
iocage fstab -a plex /mnt/tank1/apps/plex /config nullfs rw 0 0
creates the application folder for the Plex

since that doesn't exist on my machine, and I have all the jails on an SSD called "Jails" I thought it should be this:
iocage fstab -a plex mnt/Jails//mnt/iocage/jails/plex /config nullfs rw 0 0
Here is a screengrab from my server of the storage:
upload_2018-2-6_18-4-7.png


But here is what happens when I run the command:
Code:
[root@freenas ~]# iocage fstab -a plex mnt/Jails//mnt/iocage/jails/plex /config nullfs rw 0 0									  
Successfully added mount to plex's fstab																							
Traceback (most recent call last):																								
  File "/usr/local/bin/iocage", line 10, in <module>																				
   sys.exit(cli())																												
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__												
   return self.main(*args, **kwargs)																							  
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main													
   rv = self.invoke(ctx)																										  
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke												
   return _process_result(sub_ctx.command.invoke(sub_ctx))																		
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke												
   return ctx.invoke(self.callback, **ctx.params)																				
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke												
   return callback(*args, **kwargs)																								
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/fstab.py", line 126, in cli											  
   add_path=add_path, header=header)																							  
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 1061, in fstab										  
   exit_on_error=self.exit_on_error)																							  
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 65, in __init__									  
   self.__fstab_parse__()																										
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 75, in __fstab_parse__								
   self.__fstab_mount__()																										
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 165, in __fstab_mount__							  
   raise RuntimeError(f"{stderr_data.decode('utf-8')}")																			
RuntimeError: mount_nullfs: /root/mnt: No such file or directory																  
																																  
[root@freenas ~]#

Which looks like it's an error to me.

 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The iocage does not show up under Jails in the GUI
New GUI or old GUI?
iocage fstab -a plex mnt/Jails//mnt/iocage/jails/plex /config nullfs rw 0 0
I'm 99% sure that it's going to want a proper path. I have no idea what the screencap you've posted is indicating, but the path is not mnt/Jails//mnt/iocage/jails/plex. Whatever it might be, it isn't that.
 

JJT211

Patron
Joined
Jul 4, 2014
Messages
323
Yea your path is all screwed up. But according to the screenshot you've provided, you don't have any datasets.

Post a full screenshot like this:

upload_2018-2-6_21-28-36.png


The iocage does not show up under Jails in the GUI

You need to enter the new style GUI by logging out of old GUI and clicking on "Try the new BETA GUI" selection. From there, you can see your new iocage jails
 
Last edited by a moderator:

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
I'll look into the new GUI when I get home.

I set up 2 different datasets when I built the server in 9.10. one is mnt/tank and it holds all my media for the Plex, it is 8 4TB drives. I also have mnt/jails, which is where I installed all of the jails in 9.10. That is a single 60GB SSD. This is a home use only server.
 

JJT211

Patron
Joined
Jul 4, 2014
Messages
323
I'll look into the new GUI when I get home.

I set up 2 different datasets when I built the server in 9.10. one is mnt/tank and it holds all my media for the Plex, it is 8 4TB drives. I also have mnt/jails, which is where I installed all of the jails in 9.10. That is a single 60GB SSD. This is a home use only server.

Yea post up a screenshot of your storage tab
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
opened the new UI. Here is the storage screenshot:
upload_2018-2-7_16-59-16.png
 

JJT211

Patron
Joined
Jul 4, 2014
Messages
323
Post screenshot of storage from old gui
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
that was the screenshot I posted earlier
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
here is the full page though:
upload_2018-2-7_17-18-29.png
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
so I can see the new IOCAGE jail on the new UI. I don't see anything in that jail configuration in the UI that tells me what dataset(s) is/are mounted to the jail. When I first built my jails in 9.10 I was able to look at the commands in the guide and easily modify them based on the names of my data sets. I have had no such luck with the new commands.

This:
upload_2018-2-8_17-7-35.png


makes me think this command:
iocage fstab -a plex /mnt/tank1/apps/plex /config nullfs rw 0 0
should be this:
iocage fstab -a plex /mnt/jails/iocage/jails/plex /config nullfs rw 0 0

but that is obviously not working.
 
Last edited:

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
This is driving me up a wall. The command to create the IOCAGE jail works perfectly. I can see the Jail in the GUI, and I can see a bunch of new directory paths in the Storage tab. My issue is with translating those new file paths into the next 2 commands.

The server has a pair of flash drives for the boot image, 1 ~100Gig SSD "/Jails" where all of my existing warden based jails from 9.10 were created, and where I want all my IOCAGE jails to reside, and my main disk pool /Tank where all of the media files reside.

Based on the screenshots above, this looks like the right path for the config directory:
/mnt/Jails/iocage/[jail name]
but I keep getting errors when I try to run it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
/mnt/Jails/iocage/[jail name]
No, it isn't. You'd be wanting to mount a path outside of your jail, to a place inside your jail. So it would look something like iocage fstab -a plex /mnt/tank/plex /config nullfs rw 0 0.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
No, it isn't. You'd be wanting to mount a path outside of your jail, to a place inside your jail. So it would look something like iocage fstab -a plex /mnt/tank/plex /config nullfs rw 0 0.
but looking at my storage tab screenshot, it looks like "inside the jail" is
jails/iocage/jails/plex

the following files show up after creation of the jail in iocage:
upload_2018-2-9_11-1-39.png

The only thing in mnt/tank after jail creation is still the media storage:
upload_2018-2-9_11-3-52.png
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
the
Code:
/config

part of the path is where it should be from the viewpoint of inside the jail so:

Code:
iocage fstab -a [name of jail] /path/to/data/outside/of/jail /path/within/jail nullfs rw 0 0
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
I am still unclear as to what would be considered the path "inside the jail" based on the screenshot of my storage tab. There is no storage tab under the new jail in the Jails tab.

in english, the command seems to say "for the PLEX jail, the /config folder is in /mnt/tank1/apps/plex and user plex has read/write access to it".

on my server, /mnt/tank1/apps/plex does not exist, and the closest I can see is /jails/iocage/jails/plex. I have been told this is incorrect, OK, so what would be the correct path? the plexmediaserver package has been installed, it has created a folder structure for the application at /jails/iocage/jails/plex. I do not want any jails created on my main array (Tank) that is reserved for the actual media files in the Plex server.

I apologize for being so dense. I do Cisco in the real world and this stuff is like learning sanscrit to me.
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
/mnt/tank1/apps/plex does not exist, and the closest I can see is /jails/iocage/jails/plex
The closest you can see is not close at all. The closest would be /mnt/tank/plex. If /mnt/tank/plex does not exist (and the storage screenshots you've shown don't prove that by any means--they don't show directories, only datasets), create it. What would be stored there would be the configuration and metadata for Plex. That way, you can easily destroy and recreate the jail if needed or desired, with no reconfiguration needed.
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
I am still unclear as to what would be considered the path "inside the jail" based on the screenshot of my storage tab. There is no storage tab under the new jail in the Jails tab.

in english, the command seems to say "for the PLEX jail, the /config folder is in /mnt/tank1/apps/plex and user plex has read/write access to it".

on my server, /mnt/tank1/apps/plex does not exist, and the closest I can see is /jails/iocage/jails/plex. I have been told this is incorrect, OK, so what would be the correct path? the plexmediaserver package has been installed, it has created a folder structure for the application at /jails/iocage/jails/plex. I do not want any jails created on my main array (Tank) that is reserved for the actual media files in the Plex server.

I apologize for being so dense. I do Cisco in the real world and this stuff is like learning sanscrit to me.

ok so where you seem to be confused is with the /jails/iocage/jails/plex this is where the actual jail lives not where any of your data or metadata lives. the way your trying to input the command is basically your saying mount itself onto itself you need to completly forget about /jails/iocage/jails/plex for what you are trying to do it is completly irrelevant.
your trying to mount a location on your storage area ie /mnt/tank/plex into the jail which if you want it to be at the root level of the jail would be /config
if you are getting a error doing the command:
iocage fstab -a plex /mnt/tank/apps/plex /config nullfs rw 0 0
the first thing do actually check is there a location on your /mnt/tank named apps and does it also contain a folder named plex? if not create those folders after doing that there will be a place for the command to use if you still get a error then you will need to enter the jail via iocage console plex and run
Code:
mkdir /config
then exit the jail and try the fstab command if you make sure you have the folders in both locations then the command will work.
normally you should not have to have created the internal folder when using the fstab command like this it should create the location if it does not exist but to be sure it works then create it manually if you get a error.
 
Last edited by a moderator:

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
That makes sense. Thanks! I knew I was missing something. (hopefully) last question on this before I go and get this all working:
running
Code:
mkdir /config
inside the jail console will create the /config dataset inside the jail. How do I make sure that is on the SSD (Jails) and not on the drive array (Tank)? Every time we reference this command:
iocage fstab -a plex /mnt/tank/apps/plex /config nullfs rw 0 0
it seems like /mnt/tank/apps/plex is unchangeable.
 
Last edited by a moderator:
Status
Not open for further replies.
Top