summaryrefslogtreecommitdiffstats
path: root/scripts/mount-store
diff options
context:
space:
mode:
authorJonathan Bauer2020-01-24 15:11:31 +0100
committerJonathan Bauer2020-01-24 15:11:31 +0100
commite9faf265d18dc8f692c08686dcd5e2d42b95004b (patch)
treed1b06de0e0271aab207b0507158c0eb4be7132c1 /scripts/mount-store
parent[Symlink] Don't follow symlinks when deleting old link source (diff)
downloadtmlite-bwlp-e9faf265d18dc8f692c08686dcd5e2d42b95004b.tar.gz
tmlite-bwlp-e9faf265d18dc8f692c08686dcd5e2d42b95004b.tar.xz
tmlite-bwlp-e9faf265d18dc8f692c08686dcd5e2d42b95004b.zip
scripts/mount-store: hack for missing dnbd3 folder
Diffstat (limited to 'scripts/mount-store')
-rwxr-xr-xscripts/mount-store10
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
}