char *target;
nvlist_t *policy = NULL;
uint64_t max_txg = UINT64_MAX;
+ int flags = ZFS_IMPORT_MISSING_LOG;
int rewind = ZPOOL_NEVER_REWIND;
char *spa_config_path_env;
+ const char *opts = "bcdhilmM:suCDRSAFLVXevp:t:U:P";
(void) setrlimit(RLIMIT_NOFILE, &rl);
(void) enable_extended_FILE_stdio(-1, -1);
if (spa_config_path_env != NULL)
spa_config_path = spa_config_path_env;
- while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) {
+ while ((c = getopt(argc, argv, opts)) != -1) {
switch (c) {
case 'b':
case 'c':
case 'P':
dump_opt[c]++;
break;
+ case 'V':
+ flags = ZFS_IMPORT_VERBATIM;
+ break;
case 'v':
verbose++;
break;
fatal("can't open '%s': %s",
target, strerror(ENOMEM));
}
- if ((error = spa_import(name, cfg, NULL,
- ZFS_IMPORT_MISSING_LOG)) != 0) {
- error = spa_import(name, cfg, NULL,
- ZFS_IMPORT_VERBATIM);
- }
+ error = spa_import(name, cfg, NULL, flags);
}
}
\fBzdb\fR - Display zpool debugging and consistency information
.SH "SYNOPSIS"
-\fBzdb\fR [-CumdibcsDvhLXFPA] [-e [-p \fIpath\fR...]] [-t \fItxg\fR]
+\fBzdb\fR [-CumdibcsDvhLVXFPA] [-e [-p \fIpath\fR...]] [-t \fItxg\fR]
[-U \fIcache\fR] [-M \fIinflight I/Os\fR] [\fIpoolname\fR
[\fIobject\fR ...]]
\fB-F\fR but read transactions otherwise deemed too old.
.RE
+.sp
+.ne 2
+.na
+\fB-V\fR
+.ad
+.sp .6
+.RS 4n
+Attempt a verbatim import. This mimics the behavior of the kernel when loading
+a pool from a cachefile.
+.RE
+
.P
Specifying a display option more than once enables verbosity for only that
option, with more occurrences enabling more verbosity.