OS Manuals

/usr/bin/zhack

Advanced filesystem and volume manager

From zfs 2.4.4-r4 (os), captured 2026-11-05 by running zhack --help (exit 1). permalink

/usr/bin/zhack: invalid option -- '-'
Usage: zhack [-o tunable] [-c cachefile] [-d dir] [-G] <subcommand> <args> ...
       where <subcommand> <args> is one of the following:

    global options:
    -c <cachefile>   reads config from the given cachefile
    -d <dir>         directory with vdevs for import
    -o var=value...  set global variable to an unsigned 32-bit integer
    -G               dump zfs_dbgmsg buffer before exiting

    action idle <pool> [-f] [-t seconds]
        import the pool for a set time then export it
        -t <seconds> sets the time the pool is imported

    feature stat <pool>
        print information about enabled features
    feature enable [-r] [-d desc] <pool> <feature>
        add a new enabled feature to the pool
        -d <desc> sets the feature's description
        -r set read-only compatible flag for feature
    feature ref [-md] <pool> <feature>
        change the refcount on the given feature
        -d decrease instead of increase the refcount
        -m add the feature to the label if increasing refcount

    <feature> : should be a feature guid

    label repair <device>
        repair labels of a specified device according to options
        which may be combined to do their functions in one call
        -c repair corrupted label checksums
        -u restore the label on a detached device

    <device> : path to vdev

    mmp reclaim <pool>
        import a pool whose MMP claim cannot reach every mirror
        leg the config still expects, then mark the unreachable
        leaves offline so ordinary imports succeed.  Manual
        recovery: fence the peer first, this cannot see a
        live host whose legs are all invisible from here

    metaslab leak <pool>
        apply allocation map from zdb to specified pool
Options (4)
OptionDescriptionSource
-c cachefileRead pool configuration from the cachefile, which is /etc/zfs/zpool.cache by default.help + man
-d dirdirectory with vdevs for importhelp + man
-o var=value...set global variable to an unsigned 32-bit integerhelp + man
-Gdump zfs_dbgmsg buffer before exitinghelp
Examples (2) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.