Dataset is diaplaying almost 161% more space used than what is in the file system

Joined
Jan 6, 2023
Messages
5
So I'm brand new to this thread but am hoping that someone here can help me with an issue that I'm seeing in my truenas system.

I've recently decided to download my entire CD/DVD collection to my server and for a while it was working fantastic but after trying to get everything to show up on plex and moving some files around to organize them into categories for different users I noticed that my Truenas Core now shows 161% more space taken than what is actually on the file system:
1673038760587.png


Is there anything I can do to reduce the empty 1.2tb that is being used by nothing or should I work on creating another Dataset and migrating it all to that and starting from scratch?


Any help is greatly appreciated and I thank you for any advice in advance!
-J
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sounds like some snapshots ended up duplicating stuff you moved around (and possibly deleted and re-uploaded, or something).

What's the output of zfs list -o space NasStorage/Meda?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Generally speaking, ZFS space accounting is complex. You should use ZFS-aware tools to investigate space usage and not File Explorer. We provide basic ZFS stats to it (File Explorer / SMB client), but there are some fundamental assumptions in how that application works that don't line up well with realities on ZFS.
 
Last edited:
Joined
Jan 6, 2023
Messages
5
Sounds like some snapshots ended up duplicating stuff you moved around (and possibly deleted and re-uploaded, or something).

What's the output of zfs list -o space NasStorage/Meda?
1673096686204.png

That would be this here so it thinks there's more in there than what actually is.

But yes I did have to readd some of them as it wasn't displaying on my plex properly so I thought that was the trick.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
In the future, please copy/paste the CLI output instead of taking a screenshot. Easier for everyone, more accessible, less bandwidth, and easier on the eyes.
That would be this here so it thinks there's more in there than what actually is.
No, it tells you exactly where the space is going - 1.29 TB of snapshots and 1.75 TB of live data.

Identify the offending snapshots with zfs list -t snapshot -r -o space NasStorage/Media and delete them.
I have also recently selected autotrim in hopes that would shave off the extra space:
TRIM has nothing to do with this issue, as it in no way affects the semantics of freeing space. It is merely a hint to the underlying block storage (be it an SSD or another server via iSCSI or even something more exotic) that blocks are no longer relevant to the higher layers of the stack and the block storage is free to treat them as empty.
 
Joined
Jan 6, 2023
Messages
5
Hey fellow Truenas friends. I deleted all the snapshots and started a new snapshot system and that resolved this issue. Thanks for helping me find out what was hogging up that unnecessary space!
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
It’s not unnecessary… it’s in fact the whole idea…
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Well, in this case it was unnecessary because the change was intentional and unlikely to have introduced problems.
 
Joined
Jan 6, 2023
Messages
5
It’s not unnecessary… it’s in fact the whole idea…
I feel you as I have restored my snapshot settings to take up a more reasonable amount of space rather than alsmost 1/8th (2tb) of my storage as a whole for a restore point essentially. Current settings have been updated so it only takes at most ~100gb so yes it was unnecessary space.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I feel you as I have restored my snapshot settings to take up a more reasonable amount of space
That's not how it works.. the core feature of ZFS, that enables all the other goodness, is Copy-on-write. What it means is that no data is ever changed, only copied and stored again. Snapshots aren't a mere "restore point"... Its your actual data kept from being deleted after a change you made...

So ya, its unnecessary to keep snapshots full of data you have moved around, but its not unnecessary space...
 
Top