]> git.proxmox.com Git - mirror_zfs.git/blobdiff - cmd/zdb/zdb.c
OpenZFS 8962 - zdb should work on non-idle pools
[mirror_zfs.git] / cmd / zdb / zdb.c
index 5f56b10e2d01bfe21e8504fdb7759257c08200ef..a7bd64ecd61d3baf4bf168442ff3e8cc5b80efcc 100644 (file)
@@ -96,6 +96,7 @@ extern int reference_tracking_enable;
 extern int zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
 extern int zfs_vdev_async_read_max_active;
+extern boolean_t spa_load_verify_dryrun;
 
 static const char cmdname[] = "zdb";
 uint8_t dump_opt[256];
@@ -5009,6 +5010,12 @@ main(int argc, char **argv)
         */
        reference_tracking_enable = B_FALSE;
 
+       /*
+        * Do not fail spa_load when spa_load_verify fails. This is needed
+        * to load non-idle pools.
+        */
+       spa_load_verify_dryrun = B_TRUE;
+
        kernel_init(FREAD);
        if ((g_zfs = libzfs_init()) == NULL) {
                (void) fprintf(stderr, "%s", libzfs_error_init(errno));