Destroy ZFS Dataset with a dataset is busy error

by bluemedora_editor on July 2, 2012


I had this issue removing zfs dataset on an OpenSolaris file server. The dataset I was trying to remove was data/vi-san-1, which was a shared ISCSI target.

The Error

Sun Microsystems Inc. SunOS 5.11 snv_111b November 2008
root@atlas:~# zfs list
NAME USED AVAIL REFER MOUNTPOINTdata/vi-san-1 2T 2.15T 36.6G -
root@atlas:~# zfs destroy data/vi-san-1
cannot remove device links for 'data/vi-san-1': dataset is busy

Stopping the ISCSI Services

I manaully stopped the iscsi services to ensure that there are no clients (initiators) connected to this iscsi target

root@atlas:~# svcadm  disable svc:/system/iscsitgt:default

Verify that the iscsi services have stopped:

root@atlas:~# svcs -a | grep iscsi
disabled Jun_11 svc:/network/iscsi_initiator:default
disabled 13:12:16 svc:/system/iscsitgt:default

Volume Registration in the ISCSI Services

Delete the registration with the iscsi services for the volume.

root@atlas:~# sbdadm list-lu
Found 1 LU(s)
------------------------------- ----------------- ---------------
600144f06c8f810000004d23861f0001 2199023190016 /dev/zvol/rdsk/data/vi-san-1
root@atlas:~# sbdadm delete-lu 600144f06c8f810000004d23861f0001


root@atlas:~# zfs destroy -f data/vi-san-1


Get started

Try BindPlane for free. No credit card required.

Sign up
True Visibility
BindPlane for VMware vRealize Operations

True Visibility allows cloud management teams to use VMware vRealize’s powerful machine learning and capacity planning engine across their entire hybrid cloud environment.

Azure Monitor...everything
BindPlane for Microsoft Azure Monitor

Make Azure Monitor your first-pane-of-glass across your entire multi-cloud, multi-database or hybrid platform environment.

Thank you for contacting us. Your information was received. We'll be in touch shortly.