Skip to content
Snippets Groups Projects
Commit 658c1937 authored by František Dvořák's avatar František Dvořák
Browse files

Fix creating of scratch volumes

parent b5908355
Branches
Tags
No related merge requests found
...@@ -247,8 +247,8 @@ volumes="${join("\n", [for n, d in zipmap(tolist(local.nodes[*].name), tolist(op ...@@ -247,8 +247,8 @@ volumes="${join("\n", [for n, d in zipmap(tolist(local.nodes[*].name), tolist(op
volume=$(echo "$volumes" | grep "$(hostname):") volume=$(echo "$volumes" | grep "$(hostname):")
device=$(echo "$volume" | cut -d: -f2) device=$(echo "$volume" | cut -d: -f2)
if ! dumpe2fs -h "$device" >/dev/null 2>&1; then if ! dumpe2fs -h "$device" >/dev/null 2>&1; then
mkfs.ext4 -L DOCKER "$device" mkfs.ext4 -L SCRATCH "$device"
grep -q 'LABEL=DOCKER' /etc/fstab || /bin/echo -e "LABEL=DOCKER\t/scratch\text4\tdefaults\t0\t0" | tee -a /etc/fstab grep -q 'LABEL=SCRATCH' /etc/fstab || /bin/echo -e "LABEL=SCRATCH\t/scratch\text4\tdefaults\t0\t0" | tee -a /etc/fstab
mkdir -p /scratch 2>/dev/null || true mkdir -p /scratch 2>/dev/null || true
mount -a mount -a
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment