freebsd-dev/cmd
Pavel Zakharov afd2f7b711 OpenZFS 8962 - zdb should work on non-idle pools
Currently `zdb` consistently fails to examine non-idle pools as it
fails during the `spa_load()` process. The main problem seems to be
that `spa_load_verify()` fails as can be seen below:

    $ sudo zdb -d -G dcenter
    zdb: can't open 'dcenter': I/O error

    ZFS_DBGMSG(zdb):
    spa_open_common: opening dcenter
    spa_load(dcenter): LOADING
    disk vdev '/dev/dsk/c4t11d0s0': best uberblock found for spa dcenter. txg 40824950
    spa_load(dcenter): using uberblock with txg=40824950
    spa_load(dcenter): UNLOADING
    spa_load(dcenter): RELOADING
    spa_load(dcenter): LOADING
    disk vdev '/dev/dsk/c3t10d0s0': best uberblock found for spa dcenter. txg 40824952
    spa_load(dcenter): using uberblock with txg=40824952
    spa_load(dcenter): FAILED: spa_load_verify failed [error=5]
    spa_load(dcenter): UNLOADING

This change makes `spa_load_verify()` a dryrun when ran from
`zdb`. This is done by creating a global flag in zfs and then setting
it in `zdb`.

Authored by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Tim Chase <tim@chase2k.com>

OpenZFS-issue: https://illumos.org/issues/8962
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/180ad792
Closes #7459
2018-05-08 21:32:57 -07:00
..
arc_summary Add Python 3 rewrite of arc_summary.py 2018-02-28 08:52:34 -08:00
arcstat Fix some typos 2018-02-28 08:57:10 -08:00
dbufstat Fix some typos 2018-02-28 08:57:10 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Honor --with-mounthelperdir where applicable 2017-12-17 14:14:07 -08:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id vdev_id: new slot type ses 2017-12-20 09:42:07 -08:00
zdb OpenZFS 8962 - zdb should work on non-idle pools 2018-05-08 21:32:57 -07:00
zed systemd mount generator and tracking ZEDLET 2018-04-06 14:11:09 -07:00
zfs Fix 'zfs remap <poolname@snapname>' 2018-04-19 09:45:17 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Project Quota on ZFS 2018-02-13 14:54:54 -08:00
zinject Add support for decryption faults in zinject 2018-05-02 15:36:20 -07:00
zpool OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
zstreamdump Fix issues with raw sends of spill blocks 2018-04-17 11:19:03 -07:00
ztest OpenZFS 9236 - nuke spa_dbgmsg 2018-04-30 10:19:48 -07:00
zvol_id Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
Makefile.am Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00