PC-Fixe: montage LUN Steam

This commit is contained in:
nyanloutre 2019-11-21 02:12:58 +01:00
parent 42dd305fdb
commit 67944691a4
2 changed files with 18 additions and 3 deletions

View File

@ -81,5 +81,20 @@
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.passwordAuthentication = false; services.openssh.passwordAuthentication = false;
systemd.services.iscsid = {
description = "iscsid daemon";
wantedBy = [ "network-online.target" ];
preStart = "${pkgs.kmod}/bin/modprobe iscsi_tcp";
postStart = ''
${pkgs.openiscsi}/bin/iscsiadm -m discovery -t st -p 10.30.0.1
${pkgs.openiscsi}/bin/iscsiadm -m node -T iqn.2019-11.nyanlout.re:steam -l
'';
serviceConfig = {
ExecStart = "${pkgs.openiscsi}/bin/iscsid -f -c ${pkgs.openiscsi}/etc/iscsi/iscsid.conf -i ${pkgs.openiscsi}/etc/iscsi/initiatorname.iscsi";
KillMode = "process";
Restart = "on-success";
};
};
system.stateVersion = "20.03"; system.stateVersion = "20.03";
} }

View File

@ -62,9 +62,9 @@
options = [ "bind" ]; options = [ "bind" ];
}; };
fileSystems."/mnt/steam" = fileSystems."/mnt/steam-lun" =
{ device = "10.30.0.1:/exports/steam"; { device = "/dev/disk/by-path/ip-10.30.0.1:3260-iscsi-iqn.2019-11.nyanlout.re:steam-lun-1";
fsType = "nfs"; fsType = "ext4";
options = ["x-systemd.automount" "noauto"]; options = ["x-systemd.automount" "noauto"];
}; };