Removing a jail & plugin that no longer exists from the list

Status
Not open for further replies.
Joined
Apr 11, 2014
Messages
13
I recently made a rookie error, which was to follow another forum post that suggested I should delete the ZFS dataset for a jail I was having problems with.

I have now deleted the jail, but it is still showing in the jail list, and the plugin is showing in the plugin list. Is there a way that I can force delete these, on the basis that the jail is no longer there?

Any actions I take in the GUI at this point relating to the plugin or jail generate "ERROR: No such jail!" as one might expect.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
You're going to have to manually edit the config database and delete the jails. I know someone posted a guide on the forum, but I don't know where it is or what the command was.
 

brcpegasus

Cadet
Joined
May 2, 2014
Messages
1
Hi FreeNAS Noob!

I am also quite new to FreeNAS but I figured out some points which might concern your problem too. I had a very similar problem. Currently I am using FreeNAS 9.2.1.5.

What you already found out is how to delete the jails. That was quite hard for me since the OS blocked the deletion. The easy way (delete the ZFS dataset) didnt work :) Fortunately I found some commands to delete the blocking (chgflags) and then the jails could be deleted.

But what was remaining were the plugins which point to the non-existing jails. The plugins could not be started. The meta-informations for these plugins are stored in a configuration database (in my imagination something like the registry on Windows systems). At first I thought that might be complicated to find the config-parameters but the database not that big (81 tables in my case).

The database is a file located in /data/freenas-v1.db. I made a backup from the file before manipulating it. Its a SQLITE-file and I used a Firefox-Plugin called SQLite Manager to open it. Of course there are other applications to manipulate SQLite databases. For the manipulation I copied the file via WinSCP (tool to access the file-system of the FreeNAS-device) to my local harddrive.

I found the plugins at the table "plugins_plugins". All other "plugins_*" tables were empty or not relevant for my problem. So I deleted two entries at that table where the column "plugin_jail" had the value of plugin which I wanted to delete. But that was not enough since I mounted some directories into the jail. These mount points prevented the reinstallation of the plugins since the newly installed jails tried to mount the directories too but the paths were no longer correct, so I deleted these too. The mount points were saved in "jails_nullmountpoint". I identified the entries by the column "jail".

Afterwards I copied the file back to the FreeNAS-device, rebooted and the plugins were removed.

Again, it was my solution for the problem. I cannot promise that it will work at your device too but maybe it gives some helpful hints.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
This helped for me too. Thanks! BTW in the plugins_plugins, you have to click on the 'Browse and search' tab in the right pane to see actual plugins. Also rebooting may not be necessary - I just clicked on 'available' plugins in the GUI, and then again on 'installed', and the plugin was (finally) gone.
 
Status
Not open for further replies.
Top