With multi-mds now declared stable, allow_multimds now defaults to 1.
Given the max_mds parameter, it is now redundant. Remove it, leaving a
comment placeholder in the features bitmap.
ceph fs set <fs> allow_multimds is now deprecated and prints a warning
message.
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
- mds remove_data_pool -> fs rm_data_pool
- mds rm_data_pool -> fs rm_data_pool
+ * As the multiple MDS feature is now standard, it is now enabled by
+ default. ceph fs set allow_multimds is now deprecated and will be
+ removed in a future release.
+
* New CephFS file system attributes session_timeout and session_autoclose
are configurable via `ceph fs set`. The MDS config options
mds_session_timeout, mds_session_autoclose, and mds_max_file_size are now
ceph fs rm_data_pool cephfs $data3_pool
ceph osd pool delete data2 data2 --yes-i-really-really-mean-it
ceph osd pool delete data3 data3 --yes-i-really-really-mean-it
- ceph fs set cephfs allow_multimds false
expect_false ceph fs set cephfs max_mds 4
- ceph fs set cephfs allow_multimds true
ceph fs set cephfs max_mds 4
ceph fs set cephfs max_mds 3
ceph fs set cephfs max_mds 256
*/
#define CEPH_MDSMAP_DOWN (1<<0) /* cluster deliberately down */
#define CEPH_MDSMAP_ALLOW_SNAPS (1<<1) /* cluster allowed to create snapshots */
-#define CEPH_MDSMAP_ALLOW_MULTIMDS (1<<2) /* cluster allowed to have >1 active MDS */
+/* deprecated #define CEPH_MDSMAP_ALLOW_MULTIMDS (1<<2) cluster allowed to have >1 active MDS */
#define CEPH_MDSMAP_ALLOW_DIRFRAGS (1<<3) /* cluster allowed to fragment directories */
-#define CEPH_MDSMAP_ALLOW_CLASSICS (CEPH_MDSMAP_ALLOW_SNAPS | CEPH_MDSMAP_ALLOW_MULTIMDS | \
+#define CEPH_MDSMAP_ALLOW_CLASSICS (CEPH_MDSMAP_ALLOW_SNAPS | \
CEPH_MDSMAP_ALLOW_DIRFRAGS)
-#define CEPH_MDSMAP_DEFAULTS CEPH_MDSMAP_ALLOW_DIRFRAGS | CEPH_MDSMAP_ALLOW_MULTIMDS
+#define CEPH_MDSMAP_DEFAULTS CEPH_MDSMAP_ALLOW_DIRFRAGS
/*
* mds states
decode(flag, p);
legacy_mds_map.explicitly_allowed_features = flag ?
CEPH_MDSMAP_ALLOW_SNAPS : 0;
- if (legacy_mds_map.max_mds > 1) {
- legacy_mds_map.set_multimds_allowed();
- }
} else {
decode(legacy_mds_map.ever_allowed_features, p);
decode(legacy_mds_map.explicitly_allowed_features, p);
} else {
legacy_mds_map.ever_allowed_features = CEPH_MDSMAP_ALLOW_CLASSICS;
legacy_mds_map.explicitly_allowed_features = 0;
- if (legacy_mds_map.max_mds > 1) {
- legacy_mds_map.set_multimds_allowed();
- }
}
if (ev >= 7)
decode(legacy_mds_map.inline_data_enabled, p);
bool flag;
decode(flag, p);
ever_allowed_features = flag ? CEPH_MDSMAP_ALLOW_SNAPS : 0;
- ever_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS|CEPH_MDSMAP_ALLOW_DIRFRAGS;
+ ever_allowed_features |= CEPH_MDSMAP_ALLOW_DIRFRAGS;
decode(flag, p);
explicitly_allowed_features = flag ? CEPH_MDSMAP_ALLOW_SNAPS : 0;
- if (max_mds > 1) {
- set_multimds_allowed();
- }
} else {
decode(ever_allowed_features, p);
decode(explicitly_allowed_features, p);
} else {
ever_allowed_features = CEPH_MDSMAP_ALLOW_CLASSICS;
explicitly_allowed_features = 0;
- if (max_mds > 1) {
- set_multimds_allowed();
- }
}
if (ev >= 7)
decode(inline_data_enabled, p);
void clear_snaps_allowed() { clear_flag(CEPH_MDSMAP_ALLOW_SNAPS); }
bool allows_snaps() const { return test_flag(CEPH_MDSMAP_ALLOW_SNAPS); }
- void set_multimds_allowed() {
- set_flag(CEPH_MDSMAP_ALLOW_MULTIMDS);
- ever_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS;
- explicitly_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS;
- }
- void clear_multimds_allowed() { clear_flag(CEPH_MDSMAP_ALLOW_MULTIMDS); }
- bool allows_multimds() const { return test_flag(CEPH_MDSMAP_ALLOW_MULTIMDS); }
-
void set_dirfrags_allowed() {
set_flag(CEPH_MDSMAP_ALLOW_DIRFRAGS);
ever_allowed_features |= CEPH_MDSMAP_ALLOW_DIRFRAGS;
return -EINVAL;
}
- mds_rank_t oldmax = fs->mds_map.get_max_mds();
-
- if (!fs->mds_map.allows_multimds() && n > oldmax &&
- n > 1) {
- ss << "multi-MDS clusters are not enabled; set 'allow_multimds' to enable";
- return -EINVAL;
- }
if (n > MAX_MDS) {
ss << "may not have more than " << MAX_MDS << " MDS ranks";
return -EINVAL;
ss << "enabled new snapshots";
}
} else if (var == "allow_multimds") {
- bool enable_multimds = false;
- int r = parse_bool(val, &enable_multimds, ss);
- if (r != 0) {
- return r;
- }
-
- if (!enable_multimds) {
- fsmap.modify_filesystem(fs->fscid,
- [](std::shared_ptr<Filesystem> fs)
- {
- fs->mds_map.clear_multimds_allowed();
- });
- ss << "disallowed increasing the cluster size past 1";
- } else {
- fsmap.modify_filesystem(
- fs->fscid,
- [](std::shared_ptr<Filesystem> fs)
- {
- fs->mds_map.set_multimds_allowed();
- });
- ss << "enabled creation of more than 1 active MDS";
- }
+ ss << "Multiple MDS is always enabled. Use the max_mds parameter to control the number of active MDSs allowed. This command is DEPRECATED and will be REMOVED from future releases.";
} else if (var == "allow_dirfrags") {
bool enable_dirfrags = false;
int r = parse_bool(val, &enable_dirfrags, ss);
COMMAND("fs set " \
"name=fs_name,type=CephString " \
"name=var,type=CephChoices,strings=max_mds|max_file_size"
- "|allow_new_snaps|inline_data|cluster_down|allow_multimds|allow_dirfrags|balancer" \
+ "|allow_new_snaps|inline_data|cluster_down|allow_dirfrags|balancer" \
"|standby_count_wanted|session_timeout|session_autoclose " \
"name=val,type=CephString " \
"name=confirm,type=CephString,req=false", \
[ $fs -eq $CEPH_NUM_FS ] && break
fs=$(($fs + 1))
if [ "$CEPH_MAX_MDS" -gt 1 ]; then
- ceph_adm fs set "cephfs_${name}" allow_multimds true --yes-i-really-mean-it
ceph_adm fs set "cephfs_${name}" max_mds "$CEPH_MAX_MDS"
fi
done