Re: [List] Cannot find out what uses space in ZFS dataset
- In reply to: Andrea Venturoli : "Re: [List] Cannot find out what uses space in ZFS dataset"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Sep 2025 09:25:56 UTC
> On 19 Sep 2025, at 09:22, Andrea Venturoli <ml@netfence.it> wrote: > > 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? > > Yes it's the way mounts work independent of the filesystem type ( except I guess for unionfs ). > >> Does the output of the mount command show any strange mounts that could cause this ? > > Nothing. > Strange. I'm afraid that was the last thing I could think of. > > >> 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. > Agree. So that leaves us the mystery why zfs says the dataset is using 60GB ;-( With what we know now I have no idea why. Cheers, Paul