]> git.proxmox.com Git - mirror_zfs.git/commit
Taught zdb -bb to print metadata totals
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Mon, 24 Apr 2023 23:55:07 +0000 (19:55 -0400)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 23:55:07 +0000 (16:55 -0700)
commit6b6aaf6dc2e65c63c74fbd7840c14627e9a91ce2
treec071b554043884770f58a4baf3faefe90d92cb0f
parent81a2b2e6a6d9c71d314588207de9775a5ea6f72f
Taught zdb -bb to print metadata totals

People often want estimates of how much of their pool is occupied
by metadata, but they end up using lots of text processing on zdb's
output to get it.

So let's just...provide it for them.

Now, zdb -bbbs will output something like:

Blocks  LSIZE   PSIZE   ASIZE     avg    comp   %Total  Type
[...]
    68  1.06M    272K    544K      8K    4.00     0.00      L6 Total
 1.71K   212M   6.85M   13.7M      8K   30.91     0.00      L5 Total
 1.71K   212M   6.85M   13.7M      8K   30.91     0.00      L4 Total
 1.73K   214M   6.92M   13.8M      8K   30.89     0.00      L3 Total
 18.7K  2.29G    111M    221M   11.8K   21.19     0.00      L2 Total
 3.56M   454G   28.4G   56.9G   16.0K   15.97     0.19      L1 Total
  308M  36.8T   28.2T   28.6T   95.1K    1.30    99.80      L0 Total
  311M  37.3T   28.3T   28.6T   94.2K    1.32   100.00  Total
 50.4M   774G    113G    291G   5.77K    6.85     0.99  Metadata Total

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #14746
cmd/zdb/zdb.c