feat: move /home and /opt to cephfs and tweak mounts

This commit is contained in:
2025-09-23 12:11:53 +02:00
parent 8894339216
commit 82a5328d7f
5 changed files with 70 additions and 75 deletions

View File

@@ -5,41 +5,29 @@ let
options =
[ "soft" "defaults" "vers=4.2" ] ++
(if cfg.automount.enable then [ "noauto" "x-systemd.automount" ] else []);
(if cfg.automount.enable then [ "x-systemd.automount" ] else []);
users =
if cfg.users then {
"/users" = {
device = "172.16.239.222:/home";
fsType = "nfs4";
options = [
"soft"
"defaults"
"noauto"
"x-systemd.automount"
];
device = "/ceph/volumes/nfs/home";
options = [ "bind" ];
};
} else {};
opt =
let
server = "172.16.239.222";
in
if cfg.opt then {
"/opt/bin" = {
device = "${server}:/opt/bin";
fsType = "nfs4";
inherit options;
device = "/ceph/volumes/nfs/opt/bin";
options = [ "bind" ];
};
"/opt/sif" = {
device = "${server}:/opt/sif";
fsType = "nfs4";
inherit options;
device = "/ceph/volumes/nfs/opt/sif";
options = [ "bind" ];
};
"/opt/singularity" = {
device = "${server}:/opt/singularity";
fsType = "nfs4";
inherit options;
device = "/ceph/volumes/nfs/opt/singularity";
options = [ "bind" ];
};
} else {};
@@ -68,6 +56,7 @@ let
options = [
"mon_addr=172.16.239.211/172.16.239.212/172.16.239.213:6789"
"_netdev"
"x-systemd.automount"
];
};
} else {};
@@ -100,7 +89,7 @@ let
mon_host = 172.16.239.211:6789,172.16.239.212:6789,172.16.239.213:6789
log file = /tmp/ceph-$pid.log
[client.oceanbox]
key = replaceme
key = AQDb7sZokwnUAxAANjnzxX0p+W/FUtSYryuyqg==
[client.rbd]
key = replaceme
'';
@@ -113,7 +102,6 @@ in
{
options.cluster.mounts = {
rdma.enable = mkEnableOption "Enable NFS over RDMA";
gbe100.enable = mkEnableOption "Enable NFS over 100 GbE";
automount.enable = mkEnableOption "Enable NFS automounting";
users = mkEnableOption "Enable /users";
opt = mkEnableOption "Enable /opt";