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

From: Andrea Venturoli <ml_at_netfence.it>
Date: Thu, 18 Sep 2025 15:57:53 UTC
On 9/18/25 17:28, Frank Leonhardt wrote:


Thanks a lot for answering.



> First - and I can't say this often enough - ignore du with zfs! It 
> produces a figure for backward compatibility purposes but it's not good 
> at dealing with zfs concepts like compression.

Well...
I agree with you if the goal is finding out disk occupation.
However what I'm trying to do is "zfs send" this dataset: AFAICT this 
ignores compression/deduplication/data sharing/etc... so it should more 
or less agree with du.



> The REFERenced column is the amount of data accessible in the dataset 
> and may be shared with other datasets.

OK.



> The Used column is the amount of 
> space consumed by the dataset AND ALL IT'S DESCENDENTS and snapshots and 
> suchlike.

"zfs send" does not include descendents or snapshots, so it's fine.



> Things like cloned datasets and block deduplication confuse matters even 
> further.

I don't use these.



> zfs list -t all -o 
> name,refer,used,usedbychildren,usedbydataset,usedbyrefreservation,usedbysnapshots

I don't think I'm interested in snapshots, but in any case:
> # zfs list -t all -o name,refer,used,usedbychildren,usedbydataset,usedbyrefreservation,usedbysnapshots|grep default
> zroot/ROOT/default                                      62.1G  70.9G         0B   62.1G             0B     8.76G
> zroot/ROOT/default@auto_zroot-20241014020000            3.11G  2.95G          -       -              -         -
> zroot/ROOT/default@auto_zroot-20241113010000            3.01G   198M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20241213010000            3.30G  70.7M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250112010000            3.30G  60.4M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250211010000            3.30G  64.9M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250313010000            3.31G   263M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250412020000            3.32G   149M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250512020000            3.32G  68.6M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250611020000            3.34G   209M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250711020000            62.2G   407M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250810020000            62.1G   107M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250821020000            62.1G  36.2M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250828020000            62.1G  33.9M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250904020000            62.1G  28.1M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250909020000            62.1G  10.1M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250911020000            62.1G  10.3M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250912020000            62.1G  1.84M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250913020000            62.1G  5.97M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250914020000            62.1G  5.79M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250915020000            62.1G  4.75M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250916020000            62.1G  2.48M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917020000            62.1G  2.08M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917180000            62.1G  1.27M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917190000            62.1G  1.44M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917200000            62.1G  1.21M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917210000            62.1G  1.18M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917220000            62.1G  1.54M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250917230000            62.1G  1.36M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918000000            62.1G  1.44M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918010000            62.1G  1.42M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918020000            62.1G  1.65M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918030000            62.1G  1.95M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918040000            62.1G   964K          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918050000            62.1G  1.61M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918060000            62.1G   960K          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918070000            62.1G  1.48M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918080000            62.1G  1.47M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918090000            62.1G  1.74M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918100000            62.1G  2.07M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918110000            62.1G  2.03M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918120000            62.1G   892K          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918130000            62.1G  1.19M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918140000            62.1G  1.62M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918150000            62.1G  1.81M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918160000            62.1G  1.58M          -       -              -         -
> zroot/ROOT/default@auto_zroot-20250918170000            62.1G  1.86M          -       -              -         -

But again, how does this help me?
How do I find out which files take up those 62.1GB if "du" does not 
account for them?

  bye
	av.