ceph_adm osd pool create "cephfs_data_${name}" 8
ceph_adm osd pool create "cephfs_metadata_${name}" 8
ceph_adm fs new "cephfs_${name}" "cephfs_metadata_${name}" "cephfs_data_${name}"
- 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
fs=$(($fs + 1))
[ $fs -eq $CEPH_NUM_FS ] && break
done
done
fi
+# Don't set max_mds until all the daemons are started, otherwise
+# the intended standbys might end up in active roles.
+if [ "$CEPH_MAX_MDS" -gt 1 ]; then
+ sleep 5 # wait for daemons to make it into FSMap before increasing max_mds
+fi
+fs=0
+for name in a b c d e f g h i j k l m n o p
+do
+ 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
+ fs=$(($fs + 1))
+ [ $fs -eq $CEPH_NUM_FS ] && break
+done
+
if [ "$CEPH_NUM_MGR" -gt 0 ]; then
mgr=0
for name in x y z a b c d e f g h i j k l m n o p