Failed Jail creation has left a mess

Status
Not open for further replies.

bickleigh

Cadet
Joined
Jan 25, 2014
Messages
6
Hi,

Recently setup a test Freenas v9.2 server just to try and get a feel for it. Like most of my UNIX/Xenix/Linux experiences over the years I approached this with the same fear I get when I visit the dentist.:)
After some initial installation troubles...(mostly due to my reluctance to trawl through yards and yards of documentation) I have successfully setup the NAS environment.
S0 far I am quite impressed with performance of ZFS. However the NAS bit is not what I am interested in (I am sure this implementation would not have reached its level of notoriety if it didn't work properly). To test the jails bit I set up two jails, one for plexserver (ie a pluginJail type) and one for Calibre (a portJail type). The first attempt to install Plexserver failed crashing the server. On reboot there didn't seem to be any obvious damage so second attempt went in ok and Plex is working as it should. Installing Calibre was a little more fiddly but creating the jail, dataset, downloading and setup of package went ok. Configuration wasn't as smooth and ended up having to use root as the calibre server user which is fine for now. The main thing is that it works as it should and connecting via web browser works like a dream.
So far so good I was growing in confidence, Now for a real test; to set up a linux app by downloading and building within is own jail.In this case I wanted to setup serviio
Tried to create a third jail of type portJail, however mid way through the creation the server crashed on reboot I am left with a half baked jail. I can see the jail directory structure has been setup under volumes but there is not an entry in the jails table so I can not delete it from the webgui. It will not allow me to recreate it as obviously it exists in the directory structure.

So a couple of questions:

Can I setup multiple jails of the same type?

And, before I dive in and start hacking and slashing with a machette what is the cleanest way to remove this half baked jail and ensure that the management database is clean.
An before someone shouts 'hardware' the server is kosher. All components apart from the case are new.
AMD3 Motherboard
16gb DDR3 ecc memory
5 x WD 3Tb red label sata3 nas drives

Any help would be greatly appreciated

Bick
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
The point of using jails (isolation) isn't to have stuff on the root freenas install.. I'm not sure about what your specifically trying to install.. Is plex not a freenas PBI? I would use it if so - It appears you did and it's working.. As for Calibre not sure what it is.. Port installs generally go the same way - I don't mind using that method.. You sure can have multiple jails etc.. I stick to one installation / jail currently for simplicity.. As for the third jail i'm not sure what you did but if you don't have GUI entries it may require the command line to remove it.. I would wait for somebody more experienced to come along.. I've never had stable FreeNAS straight up crash without hardware issues etc..
 

bickleigh

Cadet
Joined
Jan 25, 2014
Messages
6
@Yatti420 thanks for your reply.

My OP may not have been very clear so to add a little more clarity:

This a straight forward 'shake and bake' install, nothing exotic going on here. The objective is to test the various functions available and determine stability and whether it is fit for purpose (or more specifically, fit for my purpose).
Setting up the NAS environment was as expected and looks stable. As far as hardware issues goes I have checked for any possible IRQ clashes and bios settings are vanilla.
There are three scenarios I wanted to test:

1. Install a plugin (PBI) - This was eventually achieved using the plexserver plugin which automatically sets up the jail and installs itself into the jail. failed the first time it was installed, was successful the second time.

2. Install a freebsd software port. I choose Calibre as it is something I want running on the NAS anyways. Incidentally Calibre is probably the best (free) ebook management software out there. Of course I am just using the Calibre server portion of the software here with a webgui front end and the backend management software on a windows PC. To install this require a manual setup of a Jail the shell into it to set up the software. This was achieved relatively easily.

And thirdly, Setup software that has yet to be ported to freebsd. That again requires a setup of a jail, shell into into it, download and rebuild the software and configure. This will take a lot more work and messing about and might not even work. However I choose serviio DLNA server if only because I am most familiar with it and the fact it has one of the best transcoders I have seen.

It was at this point - setting up the jail, that I ran into problems. When adding a third Jail the server crashed mid way through leaving behind a mess.

I could continue and create another jail with a different name and carry on, but I am reluctant to do this as the management of this freenas environment is no doubt highly dependent on the integrity of the management databases and I want to tidy up this mess before I continue to ensure I don't have future problems.

thanks

Bick
 

bickleigh

Cadet
Joined
Jan 25, 2014
Messages
6
Ok so maybe I didn't look hard enough.,....:oops:

Solved the problem.

It seems that when the jail creation failed the only 'mess' it left behind was the creation of a dataset. So the solution is to delete the dataset under volumes.

Jobs a good'n

Bick :)
 

rm-r

Contributor
Joined
Jan 7, 2013
Messages
166
also "did you know" on 9.2 you can create a linux jail from the dropdown list - may make life easier.... or harder :)
 

bickleigh

Cadet
Joined
Jan 25, 2014
Messages
6
I had noticed that but was not sure whether it created a true linux environment. If it is, does that mean we can run a vanilla implementation of software compiled for the linux environment.... ie no porting to bsd?
 

rm-r

Contributor
Joined
Jan 7, 2013
Messages
166
thats the idea, altough its through a compatabilty layer - i'm no expert sorry - just no of the capability - anyone else know more? you could always jus try it. i have seen examples for linux that with uname shows as centos etc - it has no idea its in a jail...
 
Status
Not open for further replies.
Top