Remove dataset fails

I have tried to sudo rm /mnt/tank/directory, but it fails. have tried from the gui, stopped docker.

It looks like its gone but never does get deleted?

How do I delete a dataset so its really gone?

What is this dataset used for? Is it SMB sharing, just docker, etc? What errors are posted, if any?

Browse some other threads and do the Tutorial by the Bot to get your forum trust level up and post images and links

TrueNAS-Bot
Type this in a new reply and send to bring up the tutorial, if you haven’t done it already.
@TrueNAS-Bot start tutorial

rm on /mnt/tank/… only nukes files inside. it wont remove the dataset itself.

try doin this:

  1. stop anything using it (apps, smb share, nfs, snapshots jobs)
  2. from shell:
    zfs list -r tank/directory
    zfs hold -r | grep tank/directory
    zfs list -t snapshot -r tank/directory
  3. if there are snapshots:
    zfs destroy -r tank/directory@%
    or destroy named ones one by one
  4. then:
    zfs destroy tank/directory
  5. if it still says busy:
    lsof +D /mnt/tank/directory
    fuser -vm /mnt/tank/directory
    kill whatever is holding it, then destroy again

gui Storage → Datasets → trash can does the same destroy under the hood. if the gui says gone but zfs list still shows it, refresh or run the destroy from shell. paste the exact zfs destroy error if it refuses.

Thks