]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: add options to enable PMEM bluestore backend 45562/head
authorKefu Chai <tchaikov@gmail.com>
Tue, 22 Mar 2022 12:59:45 +0000 (20:59 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 20 Apr 2022 12:12:00 +0000 (20:12 +0800)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/vstart.sh

index 50f4cff792113cfbb930d14e6636b41c3c3e1b82..4ab433d51f201ff16abdb14c42accafda1b00223 100755 (executable)
@@ -165,7 +165,8 @@ ceph_osd=ceph-osd
 rgw_frontend="beast"
 rgw_compression=""
 lockdep=${LOCKDEP:-1}
-spdk_enabled=0 #disable SPDK by default
+spdk_enabled=0 # disable SPDK by default
+pmem_enabled=0
 zoned_enabled=0
 io_uring_enabled=0
 with_jaeger=0
@@ -233,6 +234,7 @@ options:
        --multimds <count> allow multimds with maximum active count
        --without-dashboard: do not run using mgr dashboard
        --bluestore-spdk: enable SPDK and with a comma-delimited list of PCI-IDs of NVME device (e.g, 0000:81:00.0)
+       --bluestore-pmem: enable PMEM and with path to a file mapped to PMEM
        --msgr1: use msgr1 only
        --msgr2: use msgr2 only
        --msgr21: use msgr2 and msgr1
@@ -508,6 +510,12 @@ case $1 in
         spdk_enabled=1
         shift
         ;;
+    --bluestore-pmem)
+        [ -z "$2" ] && usage_exit
+        bluestore_pmem_file="$2"
+        pmem_enabled=1
+        shift
+        ;;
     --bluestore-devs)
         parse_block_devs --bluestore-devs "$2"
         shift
@@ -726,7 +734,7 @@ EOF
         osd max object namespace len = 64"
     fi
     if [ "$objectstore" == "bluestore" ]; then
-        if [ "$spdk_enabled" -eq 1 ]; then
+        if [ "$spdk_enabled" -eq 1 ] || [ "$pmem_enabled" -eq 1 ]; then
             BLUESTORE_OPTS="        bluestore_block_db_path = \"\"
         bluestore_block_db_size = 0
         bluestore_block_db_create = false
@@ -968,9 +976,12 @@ EOF
             if [ "$spdk_enabled" -eq 1 ]; then
                 wconf <<EOF
         bluestore_block_path = spdk:${bluestore_spdk_dev[$osd]}
+EOF
+            elif [ "$pmem_enabled" -eq 1 ]; then
+                wconf <<EOF
+        bluestore_block_path = ${bluestore_pmem_file}
 EOF
             fi
-
             rm -rf $CEPH_DEV_DIR/osd$osd || true
             if command -v btrfs > /dev/null; then
                 for f in $CEPH_DEV_DIR/osd$osd/*; do btrfs sub delete $f &> /dev/null || true; done