From fb9b0dd2f5bd1519d7e0d7afa25090dacc3fc32b Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Tue, 4 Nov 2025 19:00:18 +0000 Subject: [PATCH] Move NFS server to sparky. --- CLAUDE.md | 8 +++++--- hosts/c1/default.nix | 2 +- hosts/sparky/default.nix | 10 ++++++---- hosts/zippy/default.nix | 10 ---------- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index fca3a2d..614cc87 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,8 +18,9 @@ NixOS cluster configuration using flakes. Homelab infrastructure with Nomad/Cons │ └── nfs-services-standby.nix # NFS standby + receive replication (c1) ├── hosts/ │ ├── c1/, c2/, c3/ # Cattle nodes (quorum + workers) -│ ├── zippy/ # Primary storage + NFS server + worker (not quorum) +│ ├── sparky/ # Primary storage + NFS server + worker (not quorum) │ ├── chilly/ # Home Assistant VM + cluster member (Consul only) +│ ├── zippy/ # worker │ ├── sparky/ # Desktop + cluster member (Consul only) │ ├── fractal/ # (Proxmox, will become NixOS storage node) │ └── sunny/ # (Standalone ethereum node, not in cluster) @@ -39,9 +40,10 @@ NixOS cluster configuration using flakes. Homelab infrastructure with Nomad/Cons ### Hosts - **c1, c2, c3**: Cattle nodes, run most workloads, Nomad/Consul quorum members -- **zippy**: Primary NFS server, runs workloads (affinity), NOT quorum, replicates to c1 every 5min +- **sparky**: Primary NFS server, runs workloads (affinity), NOT quorum, replicates to c1 every 5min - **chilly**: Home Assistant VM, cluster member (Consul agent + CLI tools), no workloads -- **sparky**: Desktop/laptop, cluster member (Consul agent + CLI tools), no workloads +- **sparky**: Nomad worker +- **beefy**: Desktop/laptop, cluster member (Consul agent + CLI tools), no workloads - **fractal**: Storage node (Proxmox/ZFS), will join quorum after GlusterFS removed - **sunny**: Standalone ethereum staking node (not in cluster) diff --git a/hosts/c1/default.nix b/hosts/c1/default.nix index c261b82..7a542a9 100644 --- a/hosts/c1/default.nix +++ b/hosts/c1/default.nix @@ -23,8 +23,8 @@ networking.hostName = "c1"; services.tailscaleAutoconnect.authkey = "tskey-auth-k2nQ771YHM11CNTRL-YVpoumL2mgR6nLPG51vNhRpEKMDN7gLAi"; - # NFS standby configuration: accept replication from zippy nfsServicesStandby.replicationKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHyTKsMCbwCIlMcC/aopgz5Yfx/Q9QdlWC9jzMLgYFAV root@zippy-replication" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO5s73FSUiysHijWRGYCJY8lCtZkX1DGKAqp2671REDq root@sparky-replication" ]; } diff --git a/hosts/sparky/default.nix b/hosts/sparky/default.nix index 057cc3f..639e051 100644 --- a/hosts/sparky/default.nix +++ b/hosts/sparky/default.nix @@ -5,7 +5,11 @@ ../../common/global ../../common/cluster-member.nix ../../common/nomad-worker.nix - ../../common/nfs-services-standby.nix + ../../common/nfs-services-server.nix + # To move NFS server role to another host: + # 1. Follow procedure in docs/NFS_FAILOVER.md + # 2. Replace above line with: ../../common/nfs-services-standby.nix + # 3. Add nfsServicesStandby.replicationKeys with the new server's public key ./hardware.nix ]; @@ -18,7 +22,5 @@ networking.hostName = "sparky"; services.tailscaleAutoconnect.authkey = "tskey-auth-k6VC79UrzN11CNTRL-rvPmd4viyrQ261ifCrfTrQve7c2FesxrG"; - nfsServicesStandby.replicationKeys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHyTKsMCbwCIlMcC/aopgz5Yfx/Q9QdlWC9jzMLgYFAV root@zippy-replication" - ]; + nfsServicesServer.standbys = [ "c1" ]; } diff --git a/hosts/zippy/default.nix b/hosts/zippy/default.nix index 83afd42..f817d98 100644 --- a/hosts/zippy/default.nix +++ b/hosts/zippy/default.nix @@ -5,12 +5,6 @@ ../../common/global ../../common/cluster-member.nix # Consul + storage clients ../../common/nomad-worker.nix # Nomad client (runs jobs) - # NOTE: zippy is NOT a server - no nomad-server.nix import - ../../common/nfs-services-server.nix # NFS server for /data/services - # To move NFS server role to another host: - # 1. Follow procedure in docs/NFS_FAILOVER.md - # 2. Replace above line with: ../../common/nfs-services-standby.nix - # 3. Add nfsServicesStandby.replicationKeys with the new server's public key ./hardware.nix ]; @@ -22,8 +16,4 @@ networking.hostName = "zippy"; services.tailscaleAutoconnect.authkey = "tskey-auth-ktKyQ59f2p11CNTRL-ut8E71dLWPXsVtb92hevNX9RTjmk4owBf"; - - nfsServicesServer.standbys = [ - "sparky" - ]; }