From: huangjun Date: Thu, 30 Apr 2015 03:35:13 +0000 (+0800) Subject: init-ceph.in: Create osd data dir before fs_type check. X-Git-Tag: v9.0.2~127^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=449ef48191916cd8d9754d88100ffc3601ac57d0;p=ceph.git init-ceph.in: Create osd data dir before fs_type check. One host in cluster crashed and rebuilded, but failed to start osds because the data dir not exist. Signed-off-by: huangjun --- diff --git a/src/init-ceph.in b/src/init-ceph.in index 2ff98c7c21af..71e1b6a68727 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -344,6 +344,7 @@ for name in $what; do [ -n "$fs_opt" ] && fs_opt="-o $fs_opt" [ -n "$pre_mount" ] && do_cmd "$pre_mount" + do_root_cmd_okfail "mkdir -p $fs_path" if [ "$fs_type" = "btrfs" ]; then echo Mounting Btrfs on $host:$fs_path do_root_cmd_okfail "modprobe btrfs ; btrfs device scan || btrfsctl -a ; egrep -q '^[^ ]+ $fs_path ' /proc/mounts || mount -t btrfs $fs_opt $first_dev $fs_path"