Can't re-install plex plug because I can't delete jail

Status
Not open for further replies.

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
I had the plex plug in installed and working. At some point, I was unable to turn the plex plugin on. I received an error along the lines of "some error occurred".

I deleted the plex plug in, and attempted to re-install. I get an error stating that a jail with that name already exists. I see the jail (plexmediaserver_1) under storage tab.

I'm unable to destroy the datasets for the plex jail. I get an error stating that the datasets are busy, can't destroy snapshot.

I've spent a lot of time trying to research a solution, without any luck. I'm hoping to get some assistance to avoid screwing something up beyond recovery. I don't recall changing any jail permissions prior to when the problems started. I read somewhere that this could be a cause.

The plex version available for install is 0.9.11.7.803. Not sure if it matters but ownCloud plugin is installed and working. My freenas build is 9.2.1.8 (64 bit).

Please advise what additional information I need to provide. Thanks!

John
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
is the jail also showing under the jails tab? you could try deleting from there.

also you might want to check if anything is mounted to that jail which might be why you can't delete the dataset.
'mount | grep plexmediaserver_1'
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
Joshua,

The plexmediaserver jail does not show up under the jails tab...

The following is the result of the 'mount | grep plexmediaserver_1 command':
HAFX/jails/plesmediaserver_1 on /mnt/HAFX/jails/plexmediaserver_1 (zfs, local, nfsv4acls)

John
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Joshua,

The plexmediaserver jail does not show up under the jails tab...

The following is the result of the 'mount | grep plexmediaserver_1 command':
HAFX/jails/plesmediaserver_1 on /mnt/HAFX/jails/plexmediaserver_1 (zfs, local, nfsv4acls)

John
can you try 'jls' to see if the underlying system still sees the jail?

if not, you might want to try deleting the dataset from command line.
zfs destroy HAFX/jails/plexmediaserver_1
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
Joshua,

The jls command only lists the owncloud_1 jail.

The zfs destroy command did not delete the jail. It's still listed under the storage tab, and I get the following messages when I attempt to destroy the plexmediaserver_1 datasets from there:

HAFX/jails/plexmediaserver_1@auto-20141117.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141104.2336-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150119.0006-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141113.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141108.2336-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150201.1734-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141130.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150125.2328-1y: dataset is busy cannot destroy snapshot...

There are many more datasets listed with the same message...

John
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Joshua,

The jls command only lists the owncloud_1 jail.

The zfs destroy command did not delete the jail. It's still listed under the storage tab, and I get the following messages when I attempt to destroy the plexmediaserver_1 datasets from there:

HAFX/jails/plexmediaserver_1@auto-20141117.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141104.2336-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150119.0006-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141113.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141108.2336-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150201.1734-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20141130.0125-1y: dataset is busy cannot destroy snapshot HAFX/jails/plexmediaserver_1@auto-20150125.2328-1y: dataset is busy cannot destroy snapshot...

There are many more datasets listed with the same message...

John
ok, I think it should be safe to try this
Code:
zfs destroy -r HAFX/jails/plexmediaserver_1
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
The zfs destroy -r command also yields the same 'data set is busy' messages...

I did try to run umount /HAFX/jails/plexmediaserver_1, and again with a -l. I wanted to mention this in case I still need to unmount the jail.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The zfs destroy -r command also yields the same 'data set is busy' messages...

I did try to run umount /HAFX/jails/plexmediaserver_1, and again with a -l. I wanted to mention this in case I still need to unmount the jail.
There's a way to see what process is still accessing the mountpoint, but I don't remember of the top of my head.
You could try finding out what is accessing it, or try forcing the unmount
Code:
zfs destroy -rf HAFX/jails/plexmediaserver_1
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
The zfs destroy -rf command yields the same 'data set is busy' messages as well...

I don't think I have the umount command correct. I need to specify the file system, and I don't think I have the syntax correct.

I'll try to search to see if I can find out how to tell what is accessing the mount point. I think I did see that in a previous search result.
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
I was able to unmount the plexmediaserver_1 jail, but still unable to delete it.

I think it was the zfs holds command that I ran across previously. Here is the result when I run the command against one specific snapshot:
HAFX/jails/plexmediaserver_1@auto-20150206.2337-1y freenas:repl Fri Feb 6 23:37 2015

I'm going to see if I can figure out what the repl means...
 

hilton8r

Dabbler
Joined
Apr 5, 2015
Messages
32
I figured it out!

I ran a for loop on a list of plexmediaserver_1 snapshots, executing zfs release -r freenas:repl
Then I ran the for loop on the same list, executing zfs destroy -r

And was finally able to blow away the plexmediaserver_1 jail.

Thank you for your assistance Joshua. Time for bed. Ate too much ham today!

John
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I figured it out!

I ran a for loop on a list of plexmediaserver_1 snapshots, executing zfs release -r freenas:repl
Then I ran the for loop on the same list, executing zfs destroy -r

And was finally able to blow away the plexmediaserver_1 jail.

Thank you for your assistance Joshua. Time for bed. Ate too much ham today!

John
lol, glad you figured it out.
 
Status
Not open for further replies.
Top