summaryrefslogtreecommitdiff
path: root/src/ceph_osd.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-10-05 09:10:31 -0700
committerTommi Virtanen <tv@inktank.com>2012-10-05 15:43:18 -0700
commitd9dfa2d17859ca07d735b8e35c5dc00a25995153 (patch)
tree2b2b6a26209aa129a0d6bd53f42047e473dbb491 /src/ceph_osd.cc
parentf65daf3f24830a28e85ebe7c6fce2642f5fc6dd8 (diff)
downloadceph-d9dfa2d17859ca07d735b8e35c5dc00a25995153.tar.gz
osd: Make --get-journal-fsid not really start the osd.
This way, it won't need -i ID and it won't access the osd_data_dir. That makes it useful for locating the right osd to use with an external journal partition. Signed-off-by: Tommi Virtanen <tv@inktank.com>
Diffstat (limited to 'src/ceph_osd.cc')
-rw-r--r--src/ceph_osd.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc
index afb3d02e53c..a823befed55 100644
--- a/src/ceph_osd.cc
+++ b/src/ceph_osd.cc
@@ -265,6 +265,14 @@ int main(int argc, const char **argv)
exit(0);
}
+ if (get_journal_fsid) {
+ uuid_d fsid;
+ int r = OSD::peek_journal_fsid(g_conf->osd_journal, fsid);
+ if (r == 0)
+ cout << fsid << std::endl;
+ exit(r);
+ }
+
string magic;
uuid_d cluster_fsid, osd_fsid;
int w;
@@ -297,13 +305,6 @@ int main(int argc, const char **argv)
cout << osd_fsid << std::endl;
exit(0);
}
- if (get_journal_fsid) {
- uuid_d fsid;
- int r = OSD::peek_journal_fsid(g_conf->osd_journal, fsid);
- if (r == 0)
- cout << fsid << std::endl;
- exit(r);
- }
pick_addresses(g_ceph_context);