nfs: elete old job

This commit is contained in:
Starbeamrainbowlabs 2022-04-28 03:19:25 +01:00
parent 6a3f5612f4
commit aa309ec60e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
3 changed files with 0 additions and 62 deletions

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
if ! mountpoint -q /mnt/shared; then mount /mnt/shared; fi
if ! mountpoint -q /mnt/elfstone; then mount /mnt/elfstone; fi
if ! mountpoint -q /mnt/elessar-music; then mount /mnt/elessar-music; fi
if ! mountpoint -q /mnt/elessar-syncthing; then mount /mnt/elessar-syncthing; fi

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
echo "[job/nfs] Checking NFS mounts" >&2;
# _netdev The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system)
# nofail Do not report errors for this device if it does not exist.
# auto Auto-mount on boot
# noatime No last-access time
# tcp Use tcp, not udp
# bg The system won't block during boot until it is able to mount the filesystem, but won't give up on trying to mount it either.
# timeo=VALUE The time in deciseconds (tenths of a second) the NFS client waits for a response before it retries an NFS request.
# retrans=n The number of times the NFS client retries a request before it attempts further recovery action.
if [[ ! -d /mnt/shared ]]; then
echo "[job/nfs] Creating mount for shared cluster data" >&2;
sudo mkdir -p /mnt/shared;
echo 'magicbag.node.mooncarrot.space:/mnt/elfstone2/cluster /mnt/shared nfs auto,nofail,noatime,_netdev,tcp,bg,timeo=50,retrans=5 0 0' | sudo tee -a /etc/fstab;
sudo mount /mnt/shared;
fi
if [[ ! -d /mnt/elfstone ]]; then
echo "[job/nfs] Creating mount for elfstone" >&2;
sudo mkdir -p /mnt/elfstone;
echo 'magicbag.node.mooncarrot.space:/mnt/elfstone2/main /mnt/elfstone nfs auto,nofail,noatime,_netdev,tcp,bg,timeo=50,retrans=5 0 0' | sudo tee -a /etc/fstab;
sudo mount /mnt/elfstone;
fi
if [[ ! -d /mnt/elessar-music ]]; then
echo "[job/nfs] Creating mount for elessar-music" >&2;
sudo mkdir -p /mnt/elessar-music;
echo 'magicbag.node.mooncarrot.space:/mnt/elfstone2/syncthing/Music /mnt/elessar-music nfs auto,nofail,_netdev,noatime,tcp,bg,timeo=50,retrans=5 0 0' | sudo tee -a /etc/fstab;
sudo mount /mnt/elessar-music;
fi
if [[ ! -d /mnt/elessar-syncthing ]]; then
echo "[job/nfs] Creating mount for elessar-syncthing" >&2;
sudo mkdir -p /mnt/elessar-syncthing;
echo 'magicbag.node.mooncarrot.space:/mnt/elfstone2/syncthing /mnt/elessar-syncthing nfs auto,nofail,_netdev,noatime,tcp,bg,timeo=50,retrans=5 0 0' | sudo tee -a /etc/fstab;
sudo mount /mnt/elessar-syncthing;
fi
echo "[job/nfs] Complete" >&2;

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
RUN "sudo apt-get update";
RUN "sudo apt-get install --yes nfs-common";
SCRIPT "${JOBFILE_DIR}/nfs-setup.sh"
COPY "${JOBFILE_DIR}/cluster-shared-nfs" "/tmp/cluster-shared-nfs";
RUN "sudo mv /tmp/cluster-shared-nfs /etc/network/if-up.d/cluster-shared-nfs";
RUN "sudo chown root:root /etc/network/if-up.d/cluster-shared-nfs";
RUN "sudo chmod +x /etc/network/if-up.d/cluster-shared-nfs"