diff options
author | John Spray <john.spray@inktank.com> | 2014-02-13 13:59:00 +0100 |
---|---|---|
committer | John Spray <john.spray@inktank.com> | 2014-02-26 19:19:06 +0100 |
commit | c07a758c4efc370d6110f170fedd54cc600e2529 (patch) | |
tree | d617acba1478bece84e06b25a3e9b214e22bb32e /src/ceph_mds.cc | |
parent | mds: Create MDSUtility as base for Dumper/Resetter (diff) | |
download | ceph-c07a758c4efc370d6110f170fedd54cc600e2529.tar.xz ceph-c07a758c4efc370d6110f170fedd54cc600e2529.zip |
mds: Add dump-journal-entries
This adds a somewhat-human-readable peer to
the 'dump-journal' command.
Signed-off-by: John Spray <john.spray@inktank.com>
Diffstat (limited to 'src/ceph_mds.cc')
-rw-r--r-- | src/ceph_mds.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index 14b84097bc2..1f1fbd319d7 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -56,7 +56,9 @@ void usage() << " --debug_mds n\n" << " debug MDS level (e.g. 10)\n" << " --dump-journal rank filename\n" - << " dump the MDS journal for rank.\n" + << " dump the MDS journal (binary) for rank.\n" + << " --dump-journal-entries rank filename\n" + << " dump the MDS journal (JSON) for rank.\n" << " --journal-check rank\n" << " replay the journal for rank, then exit\n" << " --hot-standby rank\n" @@ -79,6 +81,11 @@ static int do_cmds_special_action(const std::string &action, journal_dumper.init(rank); journal_dumper.dump(dump_file.c_str()); journal_dumper.shutdown(); + } else if (action == "dump-journal-entries") { + Dumper journal_dumper; + journal_dumper.init(rank); + journal_dumper.dump_entries(); + journal_dumper.shutdown(); } else if (action == "undump-journal") { dout(0) << "undumping journal for mds." << rank << " from " << dump_file << dendl; Dumper journal_dumper; @@ -171,6 +178,10 @@ int main(int argc, const char **argv) } dump_file = *i++; } + else if (ceph_argparse_witharg(args, i, &val, "--dump-journal-entries", (char*)NULL)){ + set_special_action(action, "dump-journal-entries"); + rank = parse_rank("dump-journal-entries", val); + } else if (ceph_argparse_witharg(args, i, &val, "--reset-journal", (char*)NULL)) { set_special_action(action, "reset-journal"); rank = parse_rank("reset-journal", val); |