Reviewed by: George Wilson <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
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`.
Upstream bugs: DLPX-45471
You can view, comment on, or merge this pull request online at:
https://github.com/openzfs/openzfs/pull/520
-- Commit Summary --
* 7638 Refactor spa_load_impl into several functions
* 8961 SPA load/import should tell us why it failed
* 8962 zdb should work on non-idle pools
-- File Changes --
M usr/src/cmd/zdb/zdb.c (8)
M usr/src/uts/common/fs/zfs/spa.c (870)
M usr/src/uts/common/fs/zfs/spa_misc.c (28)
M usr/src/uts/common/fs/zfs/sys/spa.h (2)
M usr/src/uts/common/fs/zfs/sys/vdev.h (3)
M usr/src/uts/common/fs/zfs/vdev.c (76)
M usr/src/uts/common/fs/zfs/vdev_disk.c (11)
M usr/src/uts/common/fs/zfs/vdev_label.c (11)
-- Patch Links --
https://github.com/openzfs/openzfs/pull/520.patch
https://github.com/openzfs/openzfs/pull/520.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/520
------------------------------------------
openzfs-developer
Archives:
https://openzfs.topicbox.com/groups/developer/discussions/Tebb45b7c81c7f050-M7a47829d8aaefb429d0239e6
Powered by Topicbox: https://topicbox.com