[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
This commit is contained in:
Chinasubbareddy Mallavarapu 2019-08-15 14:28:13 -05:00
parent acb6f6c628
commit af0b03b69d

View File

@ -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)