type: str
level: dev
desc: Determines bluefs volume selection policy
- long_desc: Determines bluefs volume selection policy. 'use_some_extra' policy allows
+ long_desc: Determines bluefs volume selection policy. 'use_some_extra*' policy allows
to override RocksDB level granularity and put high level's data to faster device
even when the level doesn't completely fit there. 'fit_to_fast' policy enables
using 100% of faster disk capacity and allows the user to turn on 'level_compaction_dynamic_level_bytes'
enum_values:
- rocksdb_original
- use_some_extra
+ - use_some_extra_enforced
- fit_to_fast
with_legacy: true
- name: bluestore_volume_selection_reserved_factor
return r;
}
BlueFSVolumeSelector* vselector = nullptr;
- if (bluefs_layout.shared_bdev == BlueFS::BDEV_SLOW) {
+ if (bluefs_layout.shared_bdev == BlueFS::BDEV_SLOW ||
+ cct->_conf->bluestore_volume_selection_policy == "use_some_extra_enforced") {
string options = cct->_conf->bluestore_rocksdb_options;
string options_annex = cct->_conf->bluestore_rocksdb_options_annex;
rocks_opts.max_bytes_for_level_multiplier,
reserved_factor,
cct->_conf->bluestore_volume_selection_reserved,
- cct->_conf->bluestore_volume_selection_policy == "use_some_extra");
+ cct->_conf->bluestore_volume_selection_policy.find("use_some_extra")
+ == 0);
}
}
if (create) {
AdminSocket* admin_socket = g_ceph_context->get_admin_socket();
ceph_assert(admin_socket);
validate_path(cct.get(), path, false);
+
+ // make sure we can adjust any config settings
+ g_conf()._clear_safe_to_start_threads();
+ g_conf().set_val_or_die("bluestore_volume_selection_policy",
+ "use_some_extra_enforced");
BlueStore bluestore(cct.get(), path);
int r = bluestore.cold_open();
if (r < 0) {