[Solved] ZFS error: “could not destroy ‘tank’: could not unmount datasets”

Normally, using the -f flag with zpool destroy is enough to get rid of a zpool. However, if you a have a process running that’s tying up that pool, you’ll get an error like this:

# zpool destroy -f tank
umount2: Device or resource busy
umount: /tank: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: Device or resource busy
cannot unmount '/tank': umount failed
could not destroy 'tank': could not unmount datasets

Use fuser to find the process that’s using your zpool:

# fuser -c /tank
/tank: 5087

Once you have the process number, you can kill it and destroy your zpool.

# kill -9 5087
# zpool destroy tank