1
0
Fork 0

Enable automatic RAID setup on Haven

This commit is contained in:
Aires 2024-05-06 09:37:46 -04:00
parent 089b6a4c22
commit 80cbe52a42
3 changed files with 12 additions and 3 deletions

View file

@ -53,6 +53,12 @@ in
}; };
}; };
# Enable mdadm and Sapana (RAID 5 primary storage)
boot.swraid = {
enable = true;
# mdadmConf configured in nix-secrets
};
# Open port for OpenVPN # Open port for OpenVPN
networking.firewall.allowedUDPPorts = [ 1194 ]; networking.firewall.allowedUDPPorts = [ 1194 ];

View file

@ -13,7 +13,10 @@ set -e
# local storage partition # local storage partition
echo "Unlocking storage partition:" echo "Unlocking storage partition:"
# 4 TB HDD, partition #2 # 4 TB HDD, partition #2
cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e storage #cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e storage
# RAID 5
cryptsetup luksOpen /dev/md/Sapana storage
# mount local storage # mount local storage
if [ ! -f /dev/mapper/storage ]; then if [ ! -f /dev/mapper/storage ]; then

@ -1 +1 @@
Subproject commit 1381dd4a899c7fee8a4740e80101198827ea5af5 Subproject commit b08463a68a07f237232a5951b9e0e58071b9f479