diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mount-store | 10 |
1 files changed, 10 insertions, 0 deletions
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 } |