From 449ef48191916cd8d9754d88100ffc3601ac57d0 Mon Sep 17 00:00:00 2001 From: huangjun Date: Thu, 30 Apr 2015 11:35:13 +0800 Subject: [PATCH] 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 --- src/init-ceph.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/init-ceph.in b/src/init-ceph.in index 2ff98c7c21af3..71e1b6a687274 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" -- 2.39.5