Deleting Files & Snapshots Does Not Free Space

RhythmInk

Cadet
Joined
Sep 20, 2020
Messages
5
I've been freeing up space in some of my data sets by deleting into and then going into the datasets .Trash/files directory and manually clearing out the files. While doing this I accidentally deleted the files directory. It obviously was recreated but now I find that many files I delete in the dataset don't end up there and I cannot free up the space. I tried deleting all of the snapshots I had to see if that was the issues (despite the fact that none of them were particularly large). I've now deleted over 4TB of files but no space has been freed. If anyone can help me fix this problem (and probably tell me why I was doing a dumb thing in the first place) that would be grand. Thanks!

I have one pool accross 8 drives using 3 redundant drives.
Version: FreeNAS-11.3-U3.2
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
It would seem some snapshots are still pointing to your deleted data.

You can run the following command:
zfs list -t snapshot -r your_pool_name

And look under the "REFER" column. Each dataset has its own value and looking at the column will tell you how much space the snapshot represents.
If you are not familiar with snapshots, I would suggest you read about them.

When you have snapshots created on a regular basis, you should see some of the more recent snapshots will have a lower value "REFER" as some of the older ones. This is indication the files where deleted in the more recent snapshots. Because you didn't see reclamation of free space, it means you may have to delete the older snapshots which are showing a higher "REFER" value than the more recent ones.

Make sure you don't destroy snapshots that are holding files you deleted by mistakes.

Look on the forum for ways to destroy snapshots with the range parameter "%".
 

RhythmInk

Cadet
Joined
Sep 20, 2020
Messages
5
It would seem some snapshots are still pointing to your deleted data.

You can run the following command:
zfs list -t snapshot -r your_pool_name

And look under the "REFER" column. Each dataset has its own value and looking at the column will tell you how much space the snapshot represents.

After running this command none have a refer size over 2G and there are only three snapshots. They are also very old snapshots that were created when I installed a few plugins well before I started deleting the files in question.
 

RhythmInk

Cadet
Joined
Sep 20, 2020
Messages
5
An update:

The files I removed were media files for my plex plugin. Despite the fact that they are removed plex still lists them even after multiple re-scans of the library. However, unsuprisingly when I try and play one I'm told it is unaviailable. So clearly something persists somewhere in the file system.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try zfs remap your_pool_name.
 

RhythmInk

Cadet
Joined
Sep 20, 2020
Messages
5
Try zfs remap your_pool_name.

Unfortunately no change.
Screenshot from 2020-09-21 10-48-14.png
 

RhythmInk

Cadet
Joined
Sep 20, 2020
Messages
5
I'm embarrassed to say that it did not occur to me to restart the server until just now. The problem is solved. I feel quite silly. Thanks all for your help!
 
Top