From e9faf265d18dc8f692c08686dcd5e2d42b95004b Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 24 Jan 2020 15:11:31 +0100 Subject: scripts/mount-store: hack for missing dnbd3 folder --- scripts/mount-store | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts') diff --git a/scripts/mount-store b/scripts/mount-store index 3c25e27..430e9a3 100755 --- a/scripts/mount-store +++ b/scripts/mount-store @@ -35,6 +35,7 @@ esac FLAG="${DEST}/.notmounted" SUBDIR="${DEST}/bwlehrpool_store" +DNBDDIR="${DEST}/stage4" storage_test () { rm -f -- "${FLAG}" @@ -64,6 +65,15 @@ storage_test () { echo "Error: Mounted share is not writable." >&2 ls -al "${DEST}" "${SUBDIR}" >&2 fi + # HACK: make sure $DEST/stage4 is writable for dnbd3 user + mkdir -p "$DNBDDIR" + if [ ! -d "${DNBDDIR}" ]; then + echo "Error: Could not create directory $(basename "${DNBDDIR}")! Storage not writable!" >&2 + return 6 + fi + find "${DNBDDIR}" -type d -exec chgrp dnbd3 {} \; 2>/dev/null + find "${DNBDDIR}" -type d -exec chmod ug+rwx {} \; 2>/dev/null + # END HACK return $RET } -- cgit v1.2.3-55-g7522