From: Jeff Layton Date: Fri, 5 Apr 2019 13:35:17 +0000 (-0400) Subject: vstart: add new option to pass list of block devices to bluestore X-Git-Tag: v15.1.0~2905^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27518%2Fhead;p=ceph.git vstart: add new option to pass list of block devices to bluestore I was doing a bit of testing against a vstart cluster, and ended up hitting ENOSPC errors. This patch adds a new --bluestore-devs option that will set up bluestore OSDs to use a set of block devices as the backing store instead of creating files for them. They are assigned in order and if there are more OSDs than bluestore-devs, then we'll create files for the remaining ones. Also skip doing bluestore fsck on mount in this case to improve startup times. Signed-off-by: Jeff Layton --- diff --git a/src/vstart.sh b/src/vstart.sh index bb56768a3066..e83dc379b27b 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -145,6 +145,7 @@ fi filestore_path= kstore_path= +bluestore_dev= VSTART_SEC="client.vstart.sh" @@ -197,6 +198,7 @@ usage=$usage"\t--msgr2: use msgr2 only\n" usage=$usage"\t--msgr21: use msgr2 and msgr1\n" usage=$usage"\t--crimson: use crimson-osd instead of ceph-osd\n" usage=$usage"\t--osd-args: specify any extra osd specific options\n" +usage=$usage"\t--bluestore-devs: comma-separated list of blockdevs to use for bluestore\n" usage_exit() { printf "$usage" @@ -378,6 +380,16 @@ case $1 in pci_id="$2" spdk_enabled=1 shift + ;; + --bluestore-devs ) + IFS=',' read -r -a bluestore_dev <<< "$2" + for dev in "${bluestore_dev[@]}"; do + if [ ! -b $dev -o ! -w $dev ]; then + echo "All --bluestore-devs must refer to writable block devices" + exit 1 + fi + done + shift ;; * ) usage_exit @@ -741,7 +753,7 @@ EOF start_osd() { for osd in `seq 0 $(($CEPH_NUM_OSD-1))` do - if [ "$new" -eq 1 ]; then + if [ "$new" -eq 1 ]; then wconf <