Removal of old corrupted .system dataset

I have ended in the situation that I wish to remove the system dataset from my hdd pool, specifically:

tank/.system

I have confirmed in advanced settings that system dataset is set to apps which is my ssd pool

my to reason destroy the dataset is that I had a bad backplane, that resulted in a bunch of corrupted files, including these:

 pool: tank 
 state: ONLINE 
status: One or more devices has experienced an error resulting in data 
        corruption.  Applications may be affected. 
action: Restore the file in question if possible.  Otherwise restore the 
        entire pool from backup. 
   see: 
 
  scan: scrub repaired 0B in 22:24:58 with 5 errors on Sun Sep 27 01:19:39 2026 
config: 
 
        NAME                                      STATE     READ WRITE CKSUM 
        tank                                      ONLINE       0     0     0 
          raidz2-0                                ONLINE       0     0     0 
            52822cb6-0373-44f6-803f-56c2a72deed9  ONLINE       0     0    10 
            079ad8be-b3e0-4d18-be62-4b64efa1f576  ONLINE       0     0    10 
            18f35eb1-94d5-4c58-8dd3-01b74b5896fd  ONLINE       0     0    10 
            b8f190c8-ff2e-4157-9947-cbdb662bcaf2  ONLINE       0     0    10 
            e991d73c-6ca5-4162-8b51-cedfb2384448  ONLINE       0     0    10 
            f77d7021-0f6a-4acb-81a4-830b55c1ed3f  ONLINE       0     0    10 
 
errors: Permanent errors have been detected in the following files: 
 
        tank/.system/netdata-5a0a2a47cd884dbcbe527966286bfc29:/dbengine-tier1/datafile-1-0000000256.ndf 
        tank/.system/netdata-5a0a2a47cd884dbcbe527966286bfc29:/dbengine/datafile-1-0000002196.ndf

I have tried to locate the corrupted files without luck, but since I no longer need the old .system dataset I thought the best way forward was to simply remove it.

since it is hidden from the web interface I tried the terminal by I am denied from destroying it and even just unmounting it:

admin@truenas[~]$ zfs destroy tank/.system -rvp
destroy tank/.system/ctdb_shared_vol
cannot unmount '/mnt/tank/.system/ctdb_shared_vol': permission denied
destroy tank/.system/syslog-5a0a2a47cd884dbcbe527966286bfc29
cannot unmount '/mnt/tank/.system/syslog-5a0a2a47cd884dbcbe527966286bfc29': permission denied
destroy tank/.system/samba4
cannot unmount '/mnt/tank/.system/samba4': permission denied
destroy tank/.system/nfs
cannot unmount '/mnt/tank/.system/nfs': permission denied
destroy tank/.system/vm
cannot unmount '/mnt/tank/.system/vm': permission denied
destroy tank/.system/netdata-5a0a2a47cd884dbcbe527966286bfc29
cannot destroy 'tank/.system/netdata-5a0a2a47cd884dbcbe527966286bfc29': permission denied
destroy tank/.system/configs-5a0a2a47cd884dbcbe527966286bfc29
cannot unmount '/mnt/tank/.system/configs-5a0a2a47cd884dbcbe527966286bfc29': permission denied
destroy tank/.system/glusterd
cannot unmount '/mnt/tank/.system/glusterd': permission denied
destroy tank/.system/rrd-5a0a2a47cd884dbcbe527966286bfc29
cannot unmount '/mnt/tank/.system/rrd-5a0a2a47cd884dbcbe527966286bfc29': permission denied
destroy tank/.system/cores
cannot unmount '/mnt/tank/.system/cores': permission denied
destroy tank/.system/webui
cannot unmount '/mnt/tank/.system/webui': permission denied
destroy tank/.system/services
cannot unmount '/mnt/tank/.system/services': permission denied
destroy tank/.system
cannot unmount '/mnt/tank/.system': permission denied
admin@truenas[~]$ zfs unmount tank/.system
cannot unmount '/mnt/tank/.system/webui': permission denied

I am unsure of what would be the best way forward from here

Don’t you need to use sudo?

yeah sudo is the first bit. admin cant unmount those.

system dataset already on apps so tank/.system is just leftover junk. force the unmounts then nuke it:

-sudo zfs unmount -f tank/.system
-if a child still sticks: sudo zfs unmount -f tank/.system/netdata-5a0a2a47cd884dbcbe527966286bfc29 (same for the other kids that yelled)
-sudo zfs destroy -r tank/.system

if unmount still says permission denied something still has files open:

-sudo lsof +D /mnt/tank/.system | head
-stop whatever holds it then unmount -f again

after destroy:

-zpool clear tank
-scrub once so the permanent error lines drop

Well that was embarrassing, sudo did the trick.

I have run the clear command, and the scrub is running. Thank you very much quick and comprehensive answers.

What would be really embarrassing is to not ask at all…

Completely agree, I think it’s because I’m still new to the ZFS commands. Linux and the terminal is nothing new to me but TrueNAS is my first experience with ZFS, and since it’s completely GUI central I lack manual ZFS commands experience