From da927fcd971dbfd8b65252635e0054bd582c01e3 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 28 Oct 2019 11:27:34 -0400
Subject: [PATCH] Refreshed hardware configuration for storage001 w/ zpool

Also, a hostId as required by zfs.
---
 morph/make-storage.nix        |  4 +++-
 morph/storage001-hardware.nix | 10 +++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/morph/make-storage.nix b/morph/make-storage.nix
index d7e0858b..85c3e315 100644
--- a/morph/make-storage.nix
+++ b/morph/make-storage.nix
@@ -36,7 +36,9 @@
     # Bring in our module for configuring the Tahoe-LAFS service and other
     # Private Storage-specific things.
     ../nixos/modules/private-storage.nix
-   ];
+  ];
+
+  networking.hostId = "00000001";
 
   # Pass the configuration specific to this host to the 100TB module to be
   # expanded into a complete system configuration.  See the 100tb module for
diff --git a/morph/storage001-hardware.nix b/morph/storage001-hardware.nix
index 3346ddd7..f1515643 100644
--- a/morph/storage001-hardware.nix
+++ b/morph/storage001-hardware.nix
@@ -8,7 +8,7 @@
     [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
     ];
 
-  boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "megaraid_sas" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
+  boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "megaraid_sas" "usbhid" "sd_mod" ];
   boot.initrd.kernelModules = [ ];
   boot.kernelModules = [ "kvm-intel" ];
   boot.extraModulePackages = [ ];
@@ -23,6 +23,14 @@
       fsType = "ext4";
     };
 
+  # Manually created using:
+  #   zpool create -f -m legacy -o ashift=12 root raidz /dev/disk/by-id/{wwn-0x5000cca25cc06670,wwn-0x5000cca244c94a41,wwn-0x5000cca24ceb8bb4,wwn-0x500003983bd01315,wwn-0x500003983bd812b2,wwn-0x5000cca25cc09d0c,wwn-0x5000c500921dd6b6}
+  #   mount.zfs root /storage
+  fileSystems."/storage" =
+    { device = "root";
+      fsType = "zfs";
+    };
+
   swapDevices =
     [ { device = "/dev/disk/by-uuid/f986a811-4912-4e9a-8bc3-01cb6926c4c6"; }
     ];
-- 
GitLab