From: Patrick Donnelly Date: Wed, 24 Aug 2016 23:01:30 +0000 (-0400) Subject: vstart.sh: add option to turn on multimds X-Git-Tag: v11.0.1~325^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=29535caf64ef4f14d00ea1673c3b2db978250ddb;p=ceph.git vstart.sh: add option to turn on multimds This makes the necessary `ceph fs` calls to get it running. Signed-off-by: Patrick Donnelly --- diff --git a/src/vstart.sh b/src/vstart.sh index 6096b372cdfb..508130f010fc 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -69,6 +69,7 @@ export DYLD_LIBRARY_PATH=$CEPH_LIB:$DYLD_LIBRARY_PATH [ -z "$CEPH_NUM_OSD" ] && CEPH_NUM_OSD=3 [ -z "$CEPH_NUM_MDS" ] && CEPH_NUM_MDS=3 [ -z "$CEPH_NUM_FS" ] && CEPH_NUM_FS=1 +[ -z "$CEPH_MAX_MDS" ] && CEPH_MDS_MAX=1 [ -z "$CEPH_NUM_RGW" ] && CEPH_NUM_RGW=1 [ -z "$CEPH_DIR" ] && CEPH_DIR="$PWD" @@ -135,6 +136,7 @@ usage=$usage"\t--memstore use memstore as the osd objectstore backend\n" usage=$usage"\t--cache : enable cache tiering on pool\n" usage=$usage"\t--short: short object names only; necessary for ext4 dev\n" usage=$usage"\t--nolockdep disable lockdep\n" +usage=$usage"\t--multimds allow multimds with maximum active count\n" usage_exit() { printf "$usage" @@ -274,6 +276,10 @@ case $1 in --nolockdep ) lockdep=0 ;; + --multimds) + CEPH_MAX_MDS="$2" + shift + ;; * ) usage_exit esac @@ -677,6 +683,10 @@ if [ "$start_mds" -eq 1 -a "$CEPH_NUM_MDS" -gt 0 ]; then 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