AUTOMAKE_OPTIONS = gnu
-man_MANS = cosd.8
-dist_man_MANS = cosd.8
\ No newline at end of file
+man_MANS = cosd.8 mkcephfs.8
+dist_man_MANS = cosd.8 mkcephfs.8
\ No newline at end of file
cosd \- ceph object storage daemon
.SH SYNOPSIS
.B cosd
-[ \fB\-d\fP ]
\fIdatapath\fP
[ \fB\-j\fI journal\fP ]
[ \fB\-c\fI ceph.conf\fP ]
system where the object data resides. The \fIjournal\fP is optional,
and is only useful performance-wise when it resides on a different
disk than \fIdatapath\fP with low latency (ideally, an NVRAM device).
-.PP
-If neither \fB-d\fP nor \fB-f\fP is specified, the daemon will run
-in the foreground and log to stdout.
.SH OPTIONS
.TP
-\fB\-d\fP
-daemonize after startup.
+\fB\-D\fP
+Debug mode: do not daemonize after startup (run in foreground) and send log output
+to stdout.
.TP
\fB\-f\fP
-do not daemonize after startup (run in foreground). Useful when run via
+do not daemonize after startup (run in foreground), but log to the usual location.
+Useful when run via
.BR crun (8).
.TP
\fB\-j\fI journal\fP
vector<const char*> args;
argv_to_vec(argc, argv, args);
env_to_vec(args);
+ configure_daemon_mode();
common_init(args);
// mds specific args
vector<const char*> args;
argv_to_vec(argc, argv, args);
env_to_vec(args);
+ configure_daemon_mode();
common_init(args);
// args
SET_BOOL_ARG_VAL(&g_conf.dump_conf);
} else if (CMD_EQ("bind", 0)) {
assert_warn(parse_ip_port(args[++i], g_my_addr));
+ } else if (CMD_EQ("nodaemon", 'D')) {
+ g_conf.daemonize = false;
+ g_conf.log_to_stdout = true;
} else if (CMD_EQ("daemonize", 'd')) {
g_conf.daemonize = true;
g_conf.log_to_stdout = false;
cf.dump();
}
+void configure_daemon_mode()
+{
+ g_conf.daemonize = true;
+ g_conf.log_to_stdout = false;
+}
+void configure_client_mode()
+{
+ g_conf.daemonize = false;
+ g_conf.log_to_stdout = true;
+}
+
void parse_config_options(std::vector<const char*>& args)
{
int opt_len = sizeof(config_optionsp)/sizeof(config_option);
extern bool parse_ip_port(const char *s, entity_addr_t& addr, const char **end=0);
+void configure_daemon_mode();
+void configure_client_mode();
+
class ConfFile;
void parse_config_file(ConfFile *cf, bool update);
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 <device>" << std::endl;
exit(1);
}
vector<const char*> args;
argv_to_vec(argc, argv, args);
env_to_vec(args);
+ configure_daemon_mode();
common_init(args);
if (g_conf.clock_tare) g_clock.tare();
start)
# build final command
wrap=""
- runflags="-d"
+ runflags=""
runmode=""
get_conf_bool crun "$docrun" "restart on core dump" $sections
start_osd=1
fi
-ARGS="-d -c $conf"
+ARGS="-c $conf"
if [ $debug -eq 0 ]; then
CMON_ARGS="--debug_mon 10 --debug_ms 1"