From fba9f356a87afbee84e4956e4df63fd082e77cf9 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Wed, 3 May 2023 12:07:50 +0200 Subject: [PATCH] Move data dirs over to ZFS Signed-off-by: Magic_RB --- nomad/regions/homelab-1/conduit.tf | 20 ++++++++++---------- nomad/regions/homelab-1/jellyfin.tf | 12 ++++++------ nomad/regions/homelab-1/job/jellyfin.hcl | 6 ------ nomad/regions/homelab-1/syncthing.tf | 12 ++++++------ 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/nomad/regions/homelab-1/conduit.tf b/nomad/regions/homelab-1/conduit.tf index 0eee01c..1937640 100644 --- a/nomad/regions/homelab-1/conduit.tf +++ b/nomad/regions/homelab-1/conduit.tf @@ -12,14 +12,14 @@ resource "nomad_volume" "matrix-synapse" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/matrix/synapse" + share = "/mnt/kyle/infrastructure/matrix/synapse" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ] } } @@ -37,14 +37,14 @@ resource "nomad_volume" "matrix-postgresql" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/matrix/postgresql" + share = "/mnt/kyle/infrastructure/matrix/postgresql" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ] } } @@ -62,14 +62,14 @@ resource "nomad_volume" "matrix-registrations" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/matrix/registrations" + share = "/mnt/kyle/infrastructure/matrix/registrations" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ] } } @@ -87,14 +87,14 @@ resource "nomad_volume" "matrix-mautrix-facebook" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/matrix/mautrix-facebook" + share = "/mnt/kyle/infrastructure/matrix/mautrix-facebook" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ] } } @@ -112,14 +112,14 @@ resource "nomad_volume" "matrix-redis" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/matrix/redis" + share = "/mnt/kyle/infrastructure/matrix/redis" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=16384", "wsize=16384", "async" ] } } diff --git a/nomad/regions/homelab-1/jellyfin.tf b/nomad/regions/homelab-1/jellyfin.tf index 5a47210..3320a27 100644 --- a/nomad/regions/homelab-1/jellyfin.tf +++ b/nomad/regions/homelab-1/jellyfin.tf @@ -12,14 +12,14 @@ resource "nomad_volume" "jellyfin-cache" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/jellyfin/cache" + share = "/mnt/kyle/infrastructure/jellyfin/cache" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } } @@ -37,14 +37,14 @@ resource "nomad_volume" "jellyfin-config" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/jellyfin/config" + share = "/mnt/kyle/infrastructure/jellyfin/config" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } } @@ -62,14 +62,14 @@ resource "nomad_volume" "jellyfin-media" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/jellyfin/media" + share = "/mnt/kyle/infrastructure/jellyfin/media" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } } diff --git a/nomad/regions/homelab-1/job/jellyfin.hcl b/nomad/regions/homelab-1/job/jellyfin.hcl index 3f25dd2..f79fe14 100644 --- a/nomad/regions/homelab-1/job/jellyfin.hcl +++ b/nomad/regions/homelab-1/job/jellyfin.hcl @@ -118,12 +118,6 @@ job "jellyfin" { destination = "/media" read_only = false } - - volume_mount { - volume = "jellyfin-mount" - destination = "/mount" - read_only = true - } } } } diff --git a/nomad/regions/homelab-1/syncthing.tf b/nomad/regions/homelab-1/syncthing.tf index a10cb4b..043e3f4 100644 --- a/nomad/regions/homelab-1/syncthing.tf +++ b/nomad/regions/homelab-1/syncthing.tf @@ -12,14 +12,14 @@ resource "nomad_volume" "syncthing-data" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/syncthing/data" + share = "/mnt/kyle/infrastructure/syncthing/data" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } } @@ -37,14 +37,14 @@ resource "nomad_volume" "syncthing-storage" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/syncthing/storage" + share = "/mnt/kyle/infrastructure/syncthing/storage" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } } @@ -62,14 +62,14 @@ resource "nomad_volume" "syncthing-config" { context = { server = "blowhole.hosts.in.redalder.org" - share = "/var/nfs/syncthing/config" + share = "/mnt/kyle/infrastructure/syncthing/config" node_attach_driver = "nfs" provisioner_driver = "node-manual" } mount_options { fs_type = "nfs" - mount_flags = [ "nfsvers=3", "hard", "async" ] + mount_flags = [ "hard", "vers=4.2", "rsize=131072", "wsize=131072", "async" ] } }