Re: [List] Cannot find out what uses space in ZFS dataset

From: Andrea Venturoli <ml_at_netfence.it>
Date: Fri, 19 Sep 2025 07:22:37 UTC
On 9/18/25 21:50, freebsd@vanderzwan.org wrote:

> One thing that could explain this difference between du and zfs used is if you mount a small/empty filesystem on top of a very large directory.
 > In that case the content of the directory would be invisible because 
the mount masks it.

Doh!
I hadn't thought about this! That's quite obvious and it even happened 
to me a few times in the past!

Following a suggestion on a forum, I tried:
> mkdir /mnt/test
> mount -t nullfs / /mnt/test
but what I see under /mnt/test is identical to what I see under /.

The suggestion above was for UFS. I guess it works with ZFS too. Doesn't it?



> Does the output of the mount command show any strange mounts that could cause this ?

Nothing.



> About the du output what does ‘du -mx / |sort -n |tail ‘ show ?

> # du -mx / |sort -n |tail
> 238     /usr/local/lib/python3.11
> 442     /usr/lib/debug/boot
> 539     /usr/local/lib
> 567     /usr/lib/debug/usr/bin
> 758     /usr/lib/debug/usr
> 1229    /usr/local
> 1235    /usr/lib/debug
> 1371    /usr/lib
> 3051    /usr
> 3394    /

That's coherent with my earlier du output.

  bye & Thanks
	av.