SOLVED Huge size difference beween "Used" (GUI) and "sudo du" (Shell)

JoHapp

Dabbler
Joined
Jul 29, 2021
Messages
44
I am having issues freeing space on our TrueNAS.
1) There is no active snapshot and none visibly existing via GUI
2) There is no recycle bin as far as I am aeare or could see.

GUI: Storage tells me, that "UJZ-Projects" uses 15.24 TiB. (16,75 Terabyte)
Shell: "sudo du -hc --max-depth=1" tells me 3.3T total

I could imagine, that there might be some kind of old snaphots, but i can't see or access any.
Are the numbers in Storage misleading?
Is there a shell command, how I can check snapshots?
 

Attachments

  • Bildschirmfoto 2022-07-21 um 14.12.53.png
    Bildschirmfoto 2022-07-21 um 14.12.53.png
    39.1 KB · Views: 148
  • Bildschirmfoto 2022-07-21 um 14.12.18.png
    Bildschirmfoto 2022-07-21 um 14.12.18.png
    10.9 KB · Views: 138

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
df -T <path> should give you stats that match up with GUI. At the end of the day, the USED and AVAILABLE counters libzfs dishes out (zfs command, py-libzfs, etc) are obtained via same internal ZFS functions as counters you get via statvfs().

FWIW I use `df -T <path>` all the time to covert paths to datasets when investigating things (because often I need dataset for path as well as counters).
 

JoHapp

Dabbler
Joined
Jul 29, 2021
Messages
44
Hi @Ericloewe Fantastic! That already shows me the way forward!
-> ujz-TrueNas/UJZ-Projects@auto-2021-07-26_06-38 11.9T - 11.9T -

There is some old data under the surface. Now I only need to figure out how to remove it...

Would that not result in a significantly lower figure for du?
Hm, as far as i unterstand, it only limits the shown folderstructure to one level, the total size amount between "sudo du -hc --max-depth=1" and "du -h" seams equal.
 

JoHapp

Dabbler
Joined
Jul 29, 2021
Messages
44
You can run the command zfs list -o space to get a space breakdown for USED. man zfsprops will explain what all the counters mean.

NAMEAVAILUSEDUSEDSNAPUSEDDSUSEDREFRESERVUSEDCHILD
ujz-TrueNas/UJZ-Projects1.77T15.2T11.9T3.29T0B0B

very nice viewoption!
 
Top