HomeFreeBSD

Illumos 4891 - want zdb option to dump all metadata

Description

Illumos 4891 - want zdb option to dump all metadata

4891 want zdb option to dump all metadata
Reviewed by: Sonu Pillai <sonu.pillai@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>

We'd like a way for zdb to dump metadata in a machine-readable
format, so that we can bring that back from a customer site for
in-house diagnosis. Think of it as a crash dump for zpools,
which can be used for post-mortem analysis of a malfunctioning
pool

References:

https://www.illumos.org/issues/4891
https://github.com/illumos/illumos-gate/commit/df15e41

Porting notes:

  • [cmd/zdb/zdb.c]
    • a5778ea zdb: Introduce -V for verbatim import
    • In main() getopt 'opt' variable removed and the code was brought back in line with illumos.
  • [lib/libzpool/kernel.c]
    • 1e33ac1 Fix Solaris thread dependency by using pthreads
    • f0e324f Update utsname support
    • 4d58b69 Fix vn_open/vn_rdwr error handling
    • In vn_open() allocate 'dumppath' on heap instead of stack
    • Properly handle 'dump_fd == -1' error path
    • Free 'realpath' after added vn_dumpdir_code block

Ported-by: kernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
mahrensAuthored on Jan 1 2016, 1:42 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 11 2016, 7:36 PM
Parents
rGf3c9dca0937a: Illumos 4638 - Panic in ZFS via rfs3_setattr()/rfs3_write(): dirtying snapshot!
Branches
Unknown
Tags
Unknown