]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart: decrease pool size if <3 OSDs 11528/head
authorJohn Spray <john.spray@redhat.com>
Tue, 11 Oct 2016 17:11:42 +0000 (18:11 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 18 Oct 2016 10:59:41 +0000 (11:59 +0100)
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 <john.spray@redhat.com>
src/vstart.sh

index ca5eacf0a8dcf7447e6dd98cb6e5ef29f9004b8f..2da28246dd4b709b9f34f232f901142edeea7526 100755 (executable)
@@ -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