fix: disable raid on fs-backup (for now)
This commit is contained in:
@@ -26,33 +26,33 @@ in {
|
||||
xfsprogs
|
||||
];
|
||||
|
||||
boot.swraid = {
|
||||
enable = true;
|
||||
mdadmConf = ''
|
||||
DEVICE partitions
|
||||
ARRAY /dev/md/0 metadata=1.2 UUID=b743fdd4:5b339cc7:7c43f50f:3b81243e name=fs2:0
|
||||
'';
|
||||
};
|
||||
# boot.swraid = {
|
||||
# enable = true;
|
||||
# mdadmConf = ''
|
||||
# DEVICE partitions
|
||||
# ARRAY /dev/md/0 metadata=1.2 UUID=b743fdd4:5b339cc7:7c43f50f:3b81243e name=fs2:0
|
||||
# '';
|
||||
# };
|
||||
|
||||
systemd.services.restart-md0 = {
|
||||
description = "restart /dev/md0";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "sys-devices-virtual-block-md0.device" "-.mount" ];
|
||||
before = [ "backup.mount" ];
|
||||
path = [ "/run/current-system/sw/" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
script = ''
|
||||
restart=0
|
||||
${util-linux}/bin/lsblk -o MAJ:MIN -n /dev/md0 | grep -q "254:" || restart=1
|
||||
if [ $restart = 1 ]; then
|
||||
${mdadm}/bin/mdadm --stop /dev/md0
|
||||
${mdadm}/bin/mdadm --assemble /dev/md0
|
||||
sleep 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
# systemd.services.restart-md0 = {
|
||||
# description = "restart /dev/md0";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [ "sys-devices-virtual-block-md0.device" "-.mount" ];
|
||||
# before = [ "backup.mount" ];
|
||||
# path = [ "/run/current-system/sw/" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# };
|
||||
# script = ''
|
||||
# restart=0
|
||||
# ${util-linux}/bin/lsblk -o MAJ:MIN -n /dev/md0 | grep -q "254:" || restart=1
|
||||
# if [ $restart = 1 ]; then
|
||||
# ${mdadm}/bin/mdadm --stop /dev/md0
|
||||
# ${mdadm}/bin/mdadm --assemble /dev/md0
|
||||
# sleep 1
|
||||
# fi
|
||||
# '';
|
||||
# };
|
||||
|
||||
cluster = {
|
||||
k8sNode = true;
|
||||
@@ -63,13 +63,14 @@ in {
|
||||
users = true;
|
||||
opt = true;
|
||||
work = true;
|
||||
data = false;
|
||||
ceph = false;
|
||||
data = true;
|
||||
ceph = true;
|
||||
backup = false;
|
||||
};
|
||||
};
|
||||
|
||||
features.hpc.slurm.mungeUid = 996;
|
||||
features.hpc.slurm.mungeUid = 991;
|
||||
features.mft.enable = lib.mkForce true;
|
||||
|
||||
features = {
|
||||
host = {
|
||||
@@ -82,7 +83,6 @@ in {
|
||||
nfs.enable = true;
|
||||
nfs.exports = ''
|
||||
/exports 10.255.241.0/24(insecure,rw,async,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
/exports 10.255.243.0/24(insecure,rw,async,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
/exports 10.255.244.0/24(insecure,rw,async,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
'';
|
||||
};
|
||||
@@ -133,16 +133,16 @@ in {
|
||||
} ];
|
||||
ipv4.routes = [
|
||||
{
|
||||
address = "10.255.244.0";
|
||||
address = "10.255.242.0";
|
||||
prefixLength = 24;
|
||||
via = "10.255.241.99";
|
||||
via = "10.255.241.100";
|
||||
}
|
||||
];
|
||||
};
|
||||
interfaces.ibp59s0 = {
|
||||
interfaces.enp59s0np0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
address = "10.255.243.80";
|
||||
address = "10.255.244.80";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
@@ -150,7 +150,7 @@ in {
|
||||
allowedTCPPorts = [];
|
||||
allowedUDPPorts = [];
|
||||
extraCommands = ''
|
||||
iptables -t nat -A POSTROUTING -s 10.255.243.0/24 -j MASQUERADE
|
||||
# iptables -t nat -A POSTROUTING -s 10.255.243.0/24 -j MASQUERADE
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user