From: Sage Weil Date: Thu, 12 Dec 2013 21:33:40 +0000 (-0800) Subject: vstart.sh: --cache to set up pool cache(s) on startup X-Git-Tag: v0.75~45^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ffdaa5f41594e5b580dbe14b0e28a2606dc44529;p=ceph.git vstart.sh: --cache to set up pool cache(s) on startup Signed-off-by: Sage Weil --- diff --git a/src/vstart.sh b/src/vstart.sh index 86f969a76d6a..d150712352cc 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -37,6 +37,7 @@ smallmds=0 hitset="" overwrite_conf=1 cephx=1 #turn cephx on by default +cache="" MON_ADDR="" @@ -153,6 +154,14 @@ case $1 in " shift ;; + --cache ) + if [ -z "$cache" ]; then + cache="$2" + else + cache="$cache $2" + fi + shift + ;; * ) usage_exit esac @@ -578,6 +587,21 @@ EOF done fi +echo "started. stop.sh to stop. see out/* (e.g. 'tail -f out/????') for debug output." + +do_cache() { + while [ -n "$*" ]; do + p="$1" + shift + echo "creating cache for pool $p ..." + $SUDO $CEPH_ADM osd pool create ${p}-cache 8 + $SUDO $CEPH_ADM osd tier add $p ${p}-cache + $SUDO $CEPH_ADM osd tier cache-mode ${p}-cache writeback + $SUDO $CEPH_ADM osd tier set-overlay $p ${p}-cache + done +} +do_cache $cache + do_hitsets() { while [ -n "$*" ]; do pool="$1" @@ -592,8 +616,6 @@ do_hitsets() { } do_hitsets $hitset -echo "started. stop.sh to stop. see out/* (e.g. 'tail -f out/????') for debug output." - echo "" echo "export PYTHONPATH=./pybind" echo "export LD_LIBRARY_PATH=.libs"