From aa309ec60ebea82d41ba08800c95ae901dfe0b0e Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 28 Apr 2022 03:19:25 +0100 Subject: [PATCH] nfs: elete old job --- jobs/nfs/cluster-shared-nfs | 5 ---- jobs/nfs/nfs-setup.sh | 46 ------------------------------------- jobs/nfs/nfs.job | 11 --------- 3 files changed, 62 deletions(-) delete mode 100755 jobs/nfs/cluster-shared-nfs delete mode 100755 jobs/nfs/nfs-setup.sh delete mode 100755 jobs/nfs/nfs.job diff --git a/jobs/nfs/cluster-shared-nfs b/jobs/nfs/cluster-shared-nfs deleted file mode 100755 index 4736a5c..0000000 --- a/jobs/nfs/cluster-shared-nfs +++ /dev/null @@ -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 diff --git a/jobs/nfs/nfs-setup.sh b/jobs/nfs/nfs-setup.sh deleted file mode 100755 index ede3bfe..0000000 --- a/jobs/nfs/nfs-setup.sh +++ /dev/null @@ -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; diff --git a/jobs/nfs/nfs.job b/jobs/nfs/nfs.job deleted file mode 100755 index bc6d50f..0000000 --- a/jobs/nfs/nfs.job +++ /dev/null @@ -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"