How to reclaim space after deleting lots of files?

My main pool was getting close to the 80% limit for good performance.
It contains a lot of media files and is exported to windows machines and android over SMB.

I found several terabytes of uninteresting media files and deleted all of those, using WizTree from a windows client.
And Wiztree thinks 2-3 TiB have been freed up, as seen from windows.
However, looking at this pool in the TrueNAS Core WebUI, the columns Used and Available hasn’t changed???

What must I do to get the freed up space actually be made available???

If you’re using snapshots, the space will get freed up if you also delete the snapshots that are referencing the deleted files.

Hi @n3mmr , have you got snapshots ? If yes, delete them. Or if you have recycle enable, check that.

As others have said, snapshots are the most likely cause of this, and they’ll automatically be cleared up as they expire. The other reasonably-likely cause is that ZFS takes a bit of time to actually free the space when you delete files (the bigger, the longer). So if you were checking the web UI immediately after the deletion, you might not have seen the effect of the deletion yet. Wait a while and it should show up, if snapshots aren’t in play.

2 Likes

Greetings all, I’m having a similar issue, I deleted many GBs worth of data via a Windows app from a SMB share but the pool/dataset does not seem to reflect the deletion. I do not have snapshots (total snapshots is 0). Thoughts? Thanks. Tim

What is your TrueNAS version? Did you refresh the GUI by switching windows or views?

I’m on ElectricEel-24.10.0.2, sorry. Yes, I’ve refreshed.

Browse some of the other forum topics. We need to get your forum trust level up so you can more posting rights, like pictures.

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

I should also note that I am on SCALE, not core.

The version number told me that. Looks like you are a basic user and should be able to post screenshots, etc. Can you explain more on what you tried and maybe provide pictures. I use Snipping tool to capture, trim and post pics on windows 10

Usually, the snapshots is the thing and you said no snapshots

Thanks @SmallBarky, I followed your suggestion and was boosted up a trust level.

I’m using a windows tool call MSP360 that performs a backup to various destinations, including a SMB share from TrueNAS. Been doing it for years. The pool that the share is on is full (99.8%) and I obviously need to make room, so I am deleting old backups, etc. I see them being removed from the share location via Windows File Explorer and also from the mount point when I use Linux commands on the TrueNAS box itself. But the GUI stays at 99.8%

What screen shots can I get to help? Thanks. Tim

That is really full. Can you run the following and post it back using Preformatted text (</>) on toolbar above where you reply. Two separate commands below.

And just to verify you have no snapshots on this system at all? If the dataset has a parent with snapshots and it is requested Recursive, it contains the child dataset also.

sudo zpool status -v

sudo zpool list

Certainly, here it is (and I haven’t upgraded to the new features because I didn’t want to risk it at 99.8%):

zpool status -v
pool: raid
state: ONLINE
status: Some supported and requested features are not enabled on the pool.
        The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0B in 01:57:45 with 0 errors on Fri Nov 29 17:00:31 2024
config:

        NAME                                      STATE     READ WRITE CKSUM
        raid                                      ONLINE       0     0     0
          raidz1-0                                ONLINE       0     0     0
            cd806127-b2ac-483a-90ac-aefbc251f66f  ONLINE       0     0     0
            06088190-d4f0-4922-8317-042d30b1af8d  ONLINE       0     0     0
            e8575c87-86fa-4159-a995-2907339900fb  ONLINE       0     0     0
        cache
          beca6ca8-09ff-4c65-9de0-680bcc6c0736    ONLINE       0     0     0

errors: No known data errors

sudo zpool list 
NAME        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
boot-pool   220G  34.6G   185G        -         -     4%    15%  1.00x    ONLINE  -
raid       2.72T  2.63T  88.8G        -         -     2%    96%  1.00x    ONLINE  /mnt
scratch    2.72T  94.5G  2.63T        -         -     0%     3%  1.00x    ONLINE  /mnt
tb4        3.62T   935G  2.71T        -         -     0%    25%  1.00x    ONLINE  /mnt

Let me know what else I can do to help. Thanks again.

Your zpool list shows the RAID pool at 96%. How much data did you delete and did you clear your Recycle Bin? I don’t know if you have that feature turned on in SMB.

zfs list -r -t filesystem,volume -o space raid
1 Like

I don’t really know how much data I deleted, but around 200 GB is a reasonable guess. I do not have recycle bin enabled for this share (well, at least Export Recycle Bin is not checked).

@winnielinnie (I can’t get the preformatted text thingy to work)

NAME       AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
raid        2.90G  1.75T        0B    128K             0B      1.75T
raid/raid   2.90G  1.75T        0B   1.75T             0B         0B
1 Like

You did in an earlier post.

Now when I compose, the “preformatted text tool </>” is no longer showing on the toolbar.

NAME = raid
AVAIL = 2.90G
USED = 1.75T
USEDSNAP = 0B
USEDDS = 128K
USEDREFRESERV = 0B
USEDCHILD = 1.75T

NAME = raid/raid
AVAIL = 2.90G
USED = 1.75T
USEDSNAP = 0B
USEDDS = 1.75T
USEDREFRESERV = 0B
USEDCHILD = 0B

As I mentioned, I freed up something like 200GB but it shows 2.9G available.

Just put the text between three backticks.

```
paste in here
```

It’s hard to read when the columns are not aligned. Thank you for formatting it. :slightly_smiling_face:

Time to go on a scavanger hunt:

du -h -d 1 /mnt/raid/raid

From these directories, do any show an unusually large amount?

You’ll have to keep going deeper into the directories, until you find the culprit.

Nothing is being used up by snapshots or some sister dataset.