From 095c271d262ac778b39d803403593f4a4d955464 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 11 Oct 2016 18:11:42 +0100 Subject: [PATCH] vstart: decrease pool size if <3 OSDs Makes it easy to do OSD=1 for e.g. doing cephfs stuff where we don't care much about the OSDs behaviour. Signed-off-by: John Spray --- src/vstart.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vstart.sh b/src/vstart.sh index ca5eacf0a8dc..2da28246dd4b 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -71,6 +71,12 @@ export DYLD_LIBRARY_PATH=$CEPH_LIB:$DYLD_LIBRARY_PATH [ -z "$CEPH_RGW_PORT" ] && CEPH_RGW_PORT=8000 [ -z "$CEPH_CONF_PATH" ] && CEPH_CONF_PATH=$CEPH_DIR +if (( $CEPH_NUM_OSD > 3 )); then + OSD_POOL_DEFAULT_SIZE=3 +else + OSD_POOL_DEFAULT_SIZE=$CEPH_NUM_OSD +fi + extra_conf="" new=0 standby=0 @@ -492,6 +498,7 @@ if [ "$start_mon" -eq 1 ]; then fsid = $(uuidgen) osd pg bits = 3 osd pgp bits = 5 ; (invalid, but ceph should cope!) + osd pool default size = $OSD_POOL_DEFAULT_SIZE osd crush chooseleaf type = 0 osd pool default min size = 1 osd failsafe full ratio = .99 -- 2.47.3