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