Zombie zfs datasets - how to clean or recover

hello! I’m facing a zfs dataset issue, I think some of my ix-applications datasets are now zombie. I recently updated Scale OS to the latest release and after that some applications (in this thread i’m going to use tailscale as an example) were crashing because of missing files/directories.

After spending a while trying to fix the issue I gave up and deployed new app instances and restored the contents from a snapshot but now I’m unable to delete the old datasets.
Dataset shows up with zfs list and appears to be mounted in the filesystem, but zfs destroy stops with unmount failed error

I tried different things already, i.e. deleting the folders from shell; unfortunately cannot unmount '/mnt/.ix-apps/app_mounts/tailscale': unmount failed error turned into cannot unmount '/mnt/.ix-apps/app_mounts/tailscale': no such pool or dataset

I wanted to export and import the Pool but the export command tries to unmount all the datasets first which leads to the errors above.

Thank you for reading! :slightly_smiling_face:

1 Like

I have exactly the same issue. I realized it two days ago and was tearing out my hear.
And because of the issue I can’t export the storage and replication tasks fail.
I recently updated my system and am currently on: TrueNAS-SCALE-Fangtooth - TrueNAS SCALE Fangtooth 25.04 [release]

Basically I can’t destroy Fast/ix-apps/app_mounts/passbolt because no such pool or dataset, and I can’t create Fast/ix-apps/app_mounts/passbolt/config because dataset already exists. It is stuck in a deadlock. (I had the same unmount errors as OP before forcefully unmounting).

root@TrueNAS[/mnt/.ix-apps/app_mounts]# zfs destroy -R Fast/ix-apps/app_mounts/passbolt
cannot unmount '/mnt/.ix-apps/app_mounts/passbolt/config': no such pool or dataset
cannot destroy 'Fast/ix-apps/app_mounts/passbolt': dataset already exists
root@TrueNAS[/mnt/.ix-apps/app_mounts]# zfs create Fast/ix-apps/app_mounts/passbolt/config
cannot create 'Fast/ix-apps/app_mounts/passbolt/config': dataset already exists
root@TrueNAS[/mnt/.ix-apps/app_mounts]# zfs rename Fast/ix-apps/app_mounts/passbolt/config Fast/ix-apps/app_mounts/passbolt/config2
cannot unmount '/mnt/.ix-apps/app_mounts/passbolt/config': no such pool or dataset