Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2025 14:21:13 -0700
From:      David Christensen <dpchrist@holgerdanske.com>
To:        questions@freebsd.org
Subject:   Re: [List] Cannot find out what uses space in ZFS dataset
Message-ID:  <c24b6931-c48e-40d6-b017-30517c4d439f@holgerdanske.com>
In-Reply-To: <6376c8ce-a83d-46ac-9d52-514f2e034f08@netfence.it>
References:  <8edc1a9d-bad8-4d35-8e90-b750eec84e0a@netfence.it> <b056fd28-4b48-453f-9da3-299a842ffc32@fjl.co.uk> <16810449-2952-4257-b8d4-d74e03a18ff4@netfence.it> <09543B55-0259-4CCD-B56B-49FAACFB9663@vanderzwan.org> <804e8cad-e197-4ce0-b8cf-7ee326a53a94@netfence.it> <7C87A153-C197-486B-B67E-81542D9BBDA6@vanderzwan.org> <344daf02-f1e2-4be3-9c65-834d9582197f@netfence.it> <5841211A-B05C-40FF-953E-87B7A377B7AD@vanderzwan.org> <c2e70410-ffa4-41e5-a15c-71fc2c536b5d@netfence.it> <7F88E7F0-6B24-4E5B-AEBE-BF67D623FAEF@vanderzwan.org> <dcfcca39-611c-41f6-8b6a-91b90dcf6f24@netfence.it> <B9DE59A7-89D7-489E-A94C-5EA10F00226F@vanderzwan.org> <4c460392-04d3-4d28-bf52-753a84ac188f@netfence.it> <31F76B72-CE2C-47B4-AA5C-A4BDD3C9FB03@vanderzwan.org> <6376c8ce-a83d-46ac-9d52-514f2e034f08@netfence.it>

index | next in thread | previous in thread | raw e-mail

On 9/21/25 10:07, Andrea Venturoli wrote:
> On 9/19/25 15:28, freebsd@vanderzwan.org wrote:
> 
>> Maybe procstat -af and look for a regular file with a huge value in 
>> OFFSET column. That assumes the file offset is at EOF for that huge file.
> 
> Didn't help.
> 
> I finally had the chance to reboot, but not even this solved!!! :(
> 
> I still get the same figures:
>> # du -d 0 -h -x
>> 3.3G    .
>> # zdb -ddd zroot/ROOT/default 0:-1:A |sort -h -b -k 5 |tail
>>     186544    2   128K   128K  31.3M     512  57.5M  100.00  ZFS plain 
>> file
>>       5738    2   128K   128K  33.2M     512  51.9M  100.00  ZFS plain 
>> file
>>          0    6   128K    16K  39.5M     512   176M   29.37  DMU dnode
>>     186545    2   128K   128K  48.4M     512  93.5M   99.60  ZFS plain 
>> file
>>     186426    2   128K   128K  53.1M     512   101M  100.00  ZFS plain 
>> file
>>     186668    3   128K   128K  76.2M     512   178M  100.00  ZFS plain 
>> file
>>     186209    3   128K   128K  91.9M     512   253M  100.00  ZFS plain 
>> file
>>     186671    3   128K   128K   135M     512   327M  100.00  ZFS plain 
>> file
>>     186427    3   128K   128K   140M     512   334M  100.00  ZFS plain 
>> file
>>        360    3   128K   128K  58.8G     512  90.0G  100.00  ZFS plain 
>> file
> 
> 
>   bye & Thanks
>      av.


Have you done a scrub recently?


I had the idea to use diff(1) to compare the snapshots when the size 
jumped, but did not post it because if du(1) cannot see problem file(s) 
then diff(1) should not:

# diff -r /.zfs/snapshot/auto_zroot-20250611020000 
/.zfs/snapshot/auto_zroot-20250711020000


An improved idea that might work would be to use zfs-diff(8) to compare 
the snapshots.  Consider adding option "-H" and redirecting the output 
to a file for further analysis, issue tracking, etc.:

# zfs diff @auto_zroot-20250611020000 
zroot/ROOT/default@auto_zroot-20250711020000


Perhaps booting into single user mode, doing a scrub, and investigating/ 
trouble-shooting?


Perhaps booting live media, doing a scrub, and investigating/ 
trouble-shooting??


Do you have a saved zfs-send(8) backup stream or raw disk image from 
prior to the issue that you can restore?


If all else fails, backup/ wipe/ install/ restore the OS disk.  I prefer 
the oldest supported version of an OS (e.g. FreeBSD-13.5-RELEASE), as it 
should have fewer bugs than newer versions of an OS.


David



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c24b6931-c48e-40d6-b017-30517c4d439f>