Added option to deploy omap to a separate device(path)

In the HDD as OSD, SSD as journal test, we saw a great
throughput improvement if moving omap to a SSD device at
randwrite case.

This patch aim to add a config option 'filestore_omap_backend_path'
for users to configurate omap path before deploy.

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
This commit is contained in:
Chendi Xue 2015-10-29 22:09:40 +08:00 committed by Boris Ranto
parent 520ef71e0a
commit 9a5109a6ab
2 changed files with 7 additions and 2 deletions

View File

@ -981,6 +981,7 @@ OPTION(kstore_cache_tails, OPT_BOOL, true)
OPTION(kstore_default_stripe_size, OPT_INT, 65536)
OPTION(filestore_omap_backend, OPT_STR, "leveldb")
OPTION(filestore_omap_backend_path, OPT_STR, "")
OPTION(filestore_debug_disable_sharded_check, OPT_BOOL, false)

View File

@ -591,8 +591,12 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
current_op_seq_fn = sss.str();
ostringstream omss;
omss << basedir << "/current/omap";
omap_dir = omss.str();
if (g_conf->filestore_omap_backend_path != "") {
omap_dir = g_conf->filestore_omap_backend_path;
} else {
omss << basedir << "/current/omap";
omap_dir = omss.str();
}
// initialize logger
PerfCountersBuilder plb(g_ceph_context, internal_name, l_os_first, l_os_last);