will remove the monitor with the specified ip:port from the map.
+.. option:: --fsid uuid
+
+ will set the fsid to the given uuid. If not specified with --create, a random fsid will be generated.
+
Example
=======
/* note: no header guard */
OPTION(host, OPT_STR, "localhost")
+OPTION(fsid, OPT_STR, "") // used for mkfs
OPTION(public_addr, OPT_ADDR, entity_addr_t())
OPTION(cluster_addr, OPT_ADDR, entity_addr_t())
OPTION(num_client, OPT_INT, 1)
return r;
}
+ // fsid from conf?
+ if (cct->_conf->fsid.length()) {
+ if (!monmap.fsid.parse(cct->_conf->fsid.c_str())) {
+ cerr << " failed to parse fsid '" << cct->_conf->fsid << "'" << std::endl;
+ }
+ }
+
// -m foo?
if (!conf->mon_host.empty()) {
vector<entity_addr_t> addrs;
monmap.created = ceph_clock_now(g_ceph_context);
monmap.last_changed = monmap.created;
srand(getpid() + time(0));
- monmap.generate_fsid();
- cout << me << ": generated fsid " << monmap.fsid << std::endl;
+ if (g_conf->fsid.empty()) {
+ monmap.generate_fsid();
+ cout << me << ": generated fsid " << monmap.fsid << std::endl;
+ }
+ modified = true;
+ }
+ if (g_conf->fsid.length()) {
+ if (!monmap.fsid.parse(g_conf->fsid.c_str())) {
+ cerr << me << ": failed to parse fsid '" << g_conf->fsid << "'" << std::endl;
+ exit(1);
+ }
+ cout << me << ": set fsid to " << monmap.fsid << std::endl;
modified = true;
}