mirror_zfs/man/man8
Paul Dagnelie 411249498e Add allocation profile export and zhack subcommand for import
When attempting to debug performance problems on large systems, one of
the major factors that affect performance is free space
fragmentation. This heavily affects the allocation process, which is an
area of active development in ZFS. Unfortunately, fragmenting a large
pool for testing purposes is time consuming; it usually involves filling
the pool and then repeatedly overwriting data until the free space
becomes fragmented, which can take many hours. And even if the time is
available, artificial workloads rarely generate the same fragmentation
patterns as the natural workloads they're attempting to mimic.

This patch has two parts. First, in zdb, we add the ability to export
the full allocation map of the pool. It iterates over each vdev,
printing every allocated segment in the ms_allocatable range tree. This
can be done while the pool is online, though in that case the allocation
map may actually be from several different TXGs as new ones are loaded
on demand.

The second is a new subcommand for zhack, zhack metaslab leak (and its
supporting kernel changes). This is a zhack subcommand that imports a
pool and then modified the range trees of the metaslabs, allowing the
sync process to write them out normall. It does not currently store
those allocations anywhere to make them reversible, and there is no
corresponding free subcommand (which would be extremely dangerous); this
is an irreversible process, only intended for performance testing. The
only way to reclaim the space afterwards is to destroy the pool or roll
back to a checkpoint.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Closes #17576
2026-02-11 10:27:01 -08:00
..
.gitignore Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
fsck.zfs.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
mount.zfs.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
vdev_id.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zdb.8 Add allocation profile export and zhack subcommand for import 2026-02-11 10:27:01 -08:00
zed.8.in Harmonize on American spelling in several places 2025-04-16 09:59:45 -07:00
zfs_ids_to_path.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_prepare_disk.8.in SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-allow.8 Correct "umount" to "unmount" in a couple of places 2025-04-16 09:59:45 -07:00
zfs-bookmark.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-change-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-clone.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-create.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-destroy.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-diff.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-get.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-groupspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-hold.8 Capitalize in various places where appropriate 2025-04-16 09:59:45 -07:00
zfs-inherit.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-jail.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-list.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-load-key.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-mount-generator.8.in SPDX: license tags: MIT 2025-04-16 09:59:44 -07:00
zfs-mount.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-program.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-project.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-projectspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-promote.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-receive.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-recv.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-redact.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-release.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-rename.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-rewrite.8 Introduce zfs rewrite subcommand (#17246) 2025-08-07 12:34:28 -04:00
zfs-rollback.8 zfs-rollback.8: fix typo in example number 2025-05-28 16:00:28 -07:00
zfs-send.8 Fix cases where "descendent" is used as a noun 2025-04-16 09:59:45 -07:00
zfs-set.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-share.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-snapshot.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-unallow.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unjail.8 Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs-unload-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unmount.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unzone.8 Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
zfs-upgrade.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-userspace.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-wait.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs-zone.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs.8 Introduce zfs rewrite subcommand (#17246) 2025-08-07 12:34:28 -04:00
zgenhostid.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zinject.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool_influxdb.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-add.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-attach.8 Harmonize on American spelling in several places 2025-04-16 09:59:45 -07:00
zpool-checkpoint.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-clear.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-create.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-ddtprune.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-destroy.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-detach.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-events.8 Fix spelling errors 2025-04-16 09:59:45 -07:00
zpool-export.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-get.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-history.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-import.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-initialize.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-iostat.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-labelclear.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-list.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-offline.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-online.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-prefetch.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-reguid.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-remove.8 Harmonize on American spelling in several places 2025-04-16 09:59:45 -07:00
zpool-reopen.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-replace.8 Harmonize on American spelling in several places 2025-04-16 09:59:45 -07:00
zpool-resilver.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-scrub.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-set.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-split.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-status.8 Refactor man page and CLI help output per mandoc 2025-06-17 10:49:40 -07:00
zpool-sync.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-trim.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-upgrade.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool-wait.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool.8 Capitalize in various places where appropriate 2025-04-16 09:59:45 -07:00
zstream.8 SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zstreamdump.8 zstreamdump: replace with link to zstream 2021-05-21 10:16:14 -07:00