From af0b03b69d9a1eef0ce8d5b435982bac884d3b22 Mon Sep 17 00:00:00 2001 From: Chinasubbareddy Mallavarapu Date: Thu, 15 Aug 2019 14:28:13 -0500 Subject: [PATCH] [ceph-osd] fix to find empty directory logic This is to fix the logic to find empty directory which has lost+found folder created by linux filesystem. This is giving problem when linux partition mounted and using it as file backed osd. Change-Id: I11e68a7b9e5df6657d8bf199b8030bc3fc51595e --- ceph-osd/templates/bin/osd/_directory.sh.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-osd/templates/bin/osd/_directory.sh.tpl b/ceph-osd/templates/bin/osd/_directory.sh.tpl index 0edd8c5139..255412c7f8 100644 --- a/ceph-osd/templates/bin/osd/_directory.sh.tpl +++ b/ceph-osd/templates/bin/osd/_directory.sh.tpl @@ -30,7 +30,7 @@ if [[ ! -d /var/lib/ceph/osd ]]; then fi # check if anything is present, if not, create an osd and its directory -if [[ -n "$(find /var/lib/ceph/osd -prune -empty)" ]]; then +if [[ -n "$(find /var/lib/ceph/osd -type d -empty ! -name "lost+found")" ]]; then echo "Creating osd" UUID=$(uuidgen) OSD_SECRET=$(ceph-authtool --gen-print-key)