Provided by: zfsutils-linux_0.6.5.6-0ubuntu8_amd64 bug


       zinject - ZFS Fault Injector


       zinject  creates artificial problems in a ZFS pool by simulating data corruption or device
       failures. This program is dangerous.


              List injection records.

       zinject -b objset:object:level:blkd [-f frequency] [-amu] pool
              Force an error into the pool at a bookmark.

       zinject -c <id | all>
              Cancel injection records.

       zinject -d vdev -A <degrade|fault> pool
              Force a vdev into the DEGRADED or FAULTED state.

       zinject -d vdev [-e device_error] [-L label_error] [-T failure] [-F] pool
              Force a vdev error.

       zinject -I [-s seconds | -g txgs] pool
              Simulate a hardware failure that fails to honor a cache flush.

       zinject -p function pool
              Panic inside the specified function.

       zinject -t data [-e device_error] [-f frequency] [-l level] [-r range] [-amq] path
              Force an error into the contents of a file.

       zinject -t dnode [-e device_error] [-f frequency] [-l level] [-amq] path
              Force an error into the metadnode for a file or directory.

       zinject -t mos_type [-e device_error] [-f frequency] [-l level] [-r range] [-amqu] pool
              Force an error into the MOS of a pool.


       -a     Flush the ARC before injection.

       -b objset:object:level:start:end
              Force an error into the pool at this bookmark tuple. Each number is in hexidecimal,
              and only one block can be specified.

       -d vdev
              A vdev specified by path or GUID.

       -e device_error
              Specify  checksum for an ECKSUM error, dtl for an ECHILD error, io for an EIO error
              where reopening the device will succeed, or nxio for an ENXIO error where reopening
              the device will fail.

       -f frequency
              Only  inject  errors  a  fraction  of  the time. Expressed as an integer percentage
              between 1 and 100.

       -F     Fail faster. Do fewer checks.

       -g txgs
              Run for this many transaction groups before reporting failure.

       -h     Print the usage message.

       -l level
              Inject an error at a particular block level. The default is 0.

       -L label_error
              Set the label error region to one of  nvlist,  pad1,  pad2, or  uber.

       -m     Automatically remount the underlying filesystem.

       -q     Quiet mode. Only print the handler number added.

       -r range
              Inject an error over a particular  logical  range  of  an  object,  which  will  be
              translated to the appropriate blkid range according to the object's properties.

       -s seconds
              Run for this many seconds before reporting failure.

       -T failure
              Set the failure type to one of  all,  claim,  free,  read, or  write.

       -t mos_type
              Set this to mos for any data in the MOS, mosdir for an object directory, config for
              the pool configuration, bpobj for the block pointer list, spacemap  for  the  space
              map, metaslab for the metaslab, or errlog for the persistent error log.

       -u     Unload the pool after injection.


              Run zinject in debug mode.


       This man page was written by Darik Horn <> excerpting the zinject usage
       message and source code.


       zpool(8), zfs(8)