From f81d98ecb9008b8af9341bd3fb5aaa579a5b8c01 Mon Sep 17 00:00:00 2001 From: Zhang Song Date: Tue, 10 Jan 2023 17:59:21 +0800 Subject: [PATCH] src/vstart.sh: support specify the type of secondary device doc/crimson: add options and example about SeaStore Signed-off-by: Zhang Song (cherry picked from commit b40f6421f0d6f7966e13941ba13e70b5639bce93) --- doc/dev/crimson/crimson.rst | 6 +++--- src/vstart.sh | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/dev/crimson/crimson.rst b/doc/dev/crimson/crimson.rst index d2a6a00e17d..cbc20b77318 100644 --- a/doc/dev/crimson/crimson.rst +++ b/doc/dev/crimson/crimson.rst @@ -151,10 +151,10 @@ vstart.sh The following options aree handy when using ``vstart.sh``, ``--crimson`` - start ``crimson-osd`` instead of ``ceph-osd`` + Start ``crimson-osd`` instead of ``ceph-osd``. ``--nodaemon`` - do not daemonize the service + Do not daemonize the service. ``--redirect-output`` Redirect the ``stdout`` and ``stderr`` to ``out/$type.$num.stdout``. @@ -170,7 +170,7 @@ The following options aree handy when using ``vstart.sh``, for additional Seastar-specific command line options. ``--cyanstore`` - use CyanStore as the object store backend. + Use CyanStore as the object store backend. ``--bluestore`` Use the alienized BlueStore as the object store backend. This is the default. diff --git a/src/vstart.sh b/src/vstart.sh index e797dee6a65..78cbd2e2b74 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -187,6 +187,7 @@ filestore_path= kstore_path= declare -a block_devs declare -a secondary_block_devs +secondary_block_devs_type="SSD" VSTART_SEC="client.vstart.sh" @@ -255,7 +256,8 @@ options: --no-restart: dont restart process when using ceph-run --jaeger: use jaegertracing for tracing --seastore-devs: comma-separated list of blockdevs to use for seastore - --seastore-secondary-des: comma-separated list of secondary blockdevs to use for seastore + --seastore-secondary-devs: comma-separated list of secondary blockdevs to use for seastore + --seastore-secondary-devs-type: device type of all secondary blockdevs. HDD, SSD(default), ZNS or RANDOM_BLOCK_SSD --crimson-smp: number of cores to use for crimson \n EOF @@ -516,6 +518,10 @@ case $1 in parse_secondary_devs --seastore-devs "$2" shift ;; + --seastore-secondary-devs-type) + secondary_block_devs_type="$2" + shift + ;; --crimson-smp) crimson_smp=$2 shift @@ -1037,7 +1043,8 @@ EOF fi if [ -n "${secondary_block_devs[$osd]}" ]; then dd if=/dev/zero of=${secondary_block_devs[$osd]} bs=1M count=1 - ln -s ${secondary_block_devs[$osd]} $CEPH_DEV_DIR/osd$osd/block.segmented.1 + mkdir -p $CEPH_DEV_DIR/osd$osd/block.${secondary_block_devs_type}.1 + ln -s ${secondary_block_devs[$osd]} $CEPH_DEV_DIR/osd$osd/block.${secondary_block_devs_type}.1/block fi fi if [ "$objectstore" == "bluestore" ]; then -- 2.39.5