]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: add --filestore_path to direct osd.0 filestore data to specific dir
authorSage Weil <sage@redhat.com>
Sun, 26 Mar 2017 14:09:04 +0000 (10:09 -0400)
committerSage Weil <sage@redhat.com>
Fri, 19 May 2017 15:28:06 +0000 (11:28 -0400)
This hack only works for 1 osd, but it lets you put it on a specific
directory/device.

Signed-off-by: Sage Weil <sage@redhat.com>
src/vstart.sh

index a1d4f2d65b737412f9cbe257552825a8efe02412..f44be0eb29133626e6847a3ba698d0d3048bb5c8 100755 (executable)
@@ -106,6 +106,8 @@ bluestore=0
 rgw_frontend="civetweb"
 lockdep=${LOCKDEP:-1}
 
+filestore_path=
+
 VSTART_SEC="client.vstart.sh"
 
 MON_ADDR=""
@@ -249,6 +251,10 @@ case $1 in
             rgw_frontend=$2
             shift
             ;;
+    --filestore_path )
+       filestore_path=$2
+       shift
+       ;;
     -m )
            [ -z "$2" ] && usage_exit
            MON_ADDR=$2
@@ -575,7 +581,11 @@ EOF
             if command -v btrfs > /dev/null; then
                 for f in $CEPH_DEV_DIR/osd$osd/*; do btrfs sub delete $f &> /dev/null || true; done
             fi
-            mkdir -p $CEPH_DEV_DIR/osd$osd
+           if [ -n "$filestore_path" ]; then
+               ln -s $filestore_path $CEPH_DEV_DIR/osd$osd
+           else
+               mkdir -p $CEPH_DEV_DIR/osd$osd
+           fi
 
             local uuid=`uuidgen`
             echo "add osd$osd $uuid"