add zvol create script and vaultwarden iscsi target
This commit is contained in:
parent
a2f05f4298
commit
5f9dd555f6
2 changed files with 21 additions and 2 deletions
|
|
@ -46,7 +46,8 @@ let
|
||||||
# ];
|
# ];
|
||||||
|
|
||||||
targets = [
|
targets = [
|
||||||
{ name = "authentik"; zvol = "Velaris/Containers/Authentik"; lun = 0; }
|
{ name = "Authentik"; zvol = "Velaris/Containers/Authentik"; lun = 0; }
|
||||||
|
{ name = "Vaultwarden"; zvol = "Velaris/Containers/Vaultwarden"; lun = 0; }
|
||||||
];
|
];
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
@ -112,5 +113,23 @@ in {
|
||||||
}) targets;
|
}) targets;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
writeSheelScriptBin "zvolcreate" ''
|
||||||
|
SIZE=$1
|
||||||
|
ZVOL=$2
|
||||||
|
|
||||||
|
if [[ $EUID -eq 0 ]]; then
|
||||||
|
|
||||||
|
echo "Creating $SIZE Zvol $ZVOL"
|
||||||
|
|
||||||
|
zfs create -s -V $SIZE Velaris/Containers/$ZVOL
|
||||||
|
sleep 1
|
||||||
|
mkfs.xfs -b size=16384 -s size=4096 /dev/zvol/Velaris/Containers/$ZVOL
|
||||||
|
else
|
||||||
|
echo "This script needs to be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
''
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -195,7 +195,7 @@ in
|
||||||
name = "iscsi";
|
name = "iscsi";
|
||||||
iscsi = {
|
iscsi = {
|
||||||
targetPortal = "10.5.0.2:3260";
|
targetPortal = "10.5.0.2:3260";
|
||||||
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.authentik";
|
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.Authentik";
|
||||||
lun = 0;
|
lun = 0;
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
readOnly = false;
|
readOnly = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue