]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: --hitset <pool> <type>
authorSage Weil <sage@inktank.com>
Fri, 13 Dec 2013 22:50:34 +0000 (14:50 -0800)
committerSage Weil <sage@inktank.com>
Fri, 13 Dec 2013 22:50:34 +0000 (14:50 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/vstart.sh

index 4839cc1156d9f245e9396b19f91cb11c04234079..86f969a76d6a85887f15f0de9cf3ab7db4ed1a86 100755 (executable)
@@ -34,6 +34,7 @@ start_rgw=0
 ip=""
 nodaemon=0
 smallmds=0
+hitset=""
 overwrite_conf=1
 cephx=1 #turn cephx on by default
 
@@ -60,6 +61,7 @@ usage=$usage"\t-m ip:port\t\tspecify monitor address\n"
 usage=$usage"\t-k keep old configuration files\n"
 usage=$usage"\t-x enable cephx (on by default)\n"
 usage=$usage"\t-X disable cephx\n"
+usage=$usage"\t--hitset <pool> <hit_set_type>: enable hitset tracking\n"
 usage=$usage"\t-o config\t\t add extra config parameters to mds section\n"
 
 usage_exit() {
@@ -141,6 +143,11 @@ case $1 in
     -k )
            overwrite_conf=0
            ;;
+    --hitset )
+           hitset="$hitset $2 $3"
+           shift
+           shift
+           ;;
     -o )
            extra_conf="$extra_conf     $2
 "
@@ -571,6 +578,20 @@ EOF
     done
 fi
 
+do_hitsets() {
+    while [ -n "$*" ]; do
+       pool="$1"
+       type="$2"
+       shift
+       shift
+       echo "setting hit_set on pool $pool type $type ..."
+       $CEPH_ADM osd pool set $pool hit_set_type $type
+       $CEPH_ADM osd pool set $pool hit_set_count 8
+       $CEPH_ADM osd pool set $pool hit_set_period 30
+    done
+}
+do_hitsets $hitset
+
 echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
 
 echo ""