Trouble removing dataset - device busy

Status
Not open for further replies.

chrisf

Cadet
Joined
Sep 14, 2012
Messages
5
All...having a bit of an issue. I am trying to remove an old 50gb dataset and it keeps telling me its busy. Anyone know how to remove it? I have tried the GUI and via the command line (zfs -d and zfs -f) and no luck. Keep getting:

cannot unmount: /mnt/FREENAS/***x: device is busy

Thanks in advance!

CF
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Something is likely holding the dataset open: share, ssh home, service/plugin, etc. Whatever it is stop/delete it first.
 

Pseudolife

Dabbler
Joined
Jan 7, 2016
Messages
25
I was having this problem, and I even removed my plug-ins and killed all the shares aimed at that dataset. I rebooted the server, and still couldn't get the dataset to let go.

It turns out the problem was an old mount in Jails. Both the Jail and plugin it related to were gone, but the storage mount was still there.

So, if you end up like me, make sure to check here:
Click on the Jails button at the top of the GUI (9.3), then the Storage button under the tab, and make sure there aren't any mounts of that dataset into any jails (even if the jails themselves are gone.)

Sorry about the thread necro.
 

maxx

Cadet
Joined
Jan 31, 2016
Messages
8
Since this is the top hit for this problem, here is how I forcefully unmounted the dataset, so it could be deleted:

sudo zfs unmount -f </mnt/volume/dataset>

This worked great but I needed to enable "Allow SUDO" for user ROOT since it wasn't set for some reason.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This worked great but I needed to enable "Allow SUDO" for user ROOT since it wasn't set for some reason.
If you're already root, you don't need to sudo. In that case you'd just type 'zfs unmount...', not 'sudo zfs unmount...'.
 
Status
Not open for further replies.
Top