Bug #7607

zdb should work on non-idle pools

Added by Prakash Surya about 1 year ago.

Status:NewStart date:2016-11-21
Priority:NormalDue date:
Assignee:Prakash Surya% Done:

0%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Medium Tags:needs-triage

Description

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:

bash-4.3$ 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 run from zdb, by
creating a global flag in ZFS and tuning this from zdb.

Also available in: Atom