freebsd-dev/cmd
Brian Behlendorf ce5fb2a7c6
ztest: scrub verification
By design ztest will never inject non-repairable damage in to the
pool.  Update the ztest_scrub() test case such that it waits for
the scrub to complete and verifies the pool is always repairable.

After enabling scrub verification two scenarios were encountered
which are the result of how ztest manages failure injection.

The first case is straight forward and pertains to detaching a
mirror vdev.  In this case, the pool must always be scrubbed prior
the detach.  Failure to do so can potentially lock in previously
repairable data corruption by removing all good copies of a block
leaving only damaged ones.

The second is a little more subtle.  The child/offset selection
logic in ztest_fault_inject() depends on the calculated number of
leaves always remaining constant between injection passes.  This
is true within a single execution of ztest, but when using zloop.sh
random values are selected for each restart.  Therefore, when ztest
imports an existing pool it must be scrubbed before failure injection
can be safely enabled.  Otherwise it is possible that it will inject
non-repairable damage.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8269
2019-01-18 09:47:55 -08:00
..
arc_summary pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
arcstat pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
dbufstat pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
fsck_zfs
mount_zfs Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
zdb ztest: split block reconstruction 2019-01-16 14:10:02 -08:00
zed zed: detect and offline physically removed devices 2018-11-09 11:17:24 -08:00
zfs Disable 'zfs remap' command 2019-01-15 15:46:58 -08:00
zgenhostid
zhack Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zinject Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zpool Add 'zpool status -i' option 2019-01-07 11:03:18 -08:00
zstreamdump zstreamdump dumps core printing truncated nvlist 2018-09-18 09:43:09 -07:00
ztest ztest: scrub verification 2019-01-18 09:47:55 -08:00
zvol_id Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
Makefile.am