// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software * Foundation. See file COPYING. * */ #include #include #include #include #include #include using namespace std; #include "config.h" #include "mon/MonMap.h" #include "mon/MonClient.h" #include "osd/OSD.h" #include "ebofs/Ebofs.h" #include "msg/SimpleMessenger.h" #include "common/Timer.h" void usage() { cerr << "usage: cosd [-m monitor] [--mkfs_for_osd ]" << std::endl; cerr << " -d daemonize" << std::endl; cerr << " --debug_osd N set debug level (e.g. 10)" << std::endl; cerr << " --debug_ms N set message debug level (e.g. 1)" << std::endl; cerr << " --ebofs use EBOFS for object storage (default)" << std::endl; cerr << " --fakestore store objects as files in directory " << std::endl; exit(1); } int main(int argc, const char **argv) { vector args; argv_to_vec(argc, argv, args); parse_config_options(args); if (g_conf.clock_tare) g_clock.tare(); // osd specific args const char *dev = 0; int whoami = -1; bool mkfs = 0; for (unsigned i=0; iinit(); rank.wait(); // done delete osd; return 0; }