diff --git a/morph/README.rst b/morph/README.rst index 2af46df9acf2e64137bd141a6538f2f69f384e63..5213e42d6b9d6cc8db2a585f16c7eb8109120018 100644 --- a/morph/README.rst +++ b/morph/README.rst @@ -50,15 +50,13 @@ Storage nodes are brought into the grid in a multi-step process. Here are the steps to configure a new node, starting from a minimal NixOS 19.03 or 19.09 installation. -#. Copy ``/etc/nixos/hardware-configuration.nix`` to ``storageNNN-hardware.nix``. - In the case of an EC2 instance, copy ``/etc/nixos/configuration.nix`` instead. +#. Copy the remote file ``/etc/nixos/hardware-configuration.nix`` to the local file ``storageNNN-hardware.nix``. + In the case of an EC2 instance, copy the remote file ``/etc/nixos/configuration.nix`` instead. #. Add ``"zfs"`` to ``boot.supportedFilesystems`` in ``storageNNN-hardware.nix``. -#. Create a ``storageNNN-config.nix`` containing further configuration for the new host. -#. Add an entry for the new host to ``grid.nix`` referencing the new files. -#. Deploy to the new host with ``morph deploy morph/grid.nix --on <identifier> boot``. - There will likely be some errors from ZFS-related systemd units which cannot yet succeed because the kernel lacks ZFS support. -#. Log on to the new host and reboot it. -#. Log on to the new host and manually create a storage zpool:: +#. Add a unique value for ``networking.hostId`` in ``storageNNN-hardware.nix``. +#. Copy ``storageNNN-hardware.nix`` back to ``/etc/nixos/hardware-configuration.nix``. +#. Run ``nixos-rebuild test``. +#. Manually create a storage zpool:: zpool create -m legacy -o ashift=12 root raidz /dev/disk/by-id/{...} @@ -76,6 +74,11 @@ starting from a minimal NixOS 19.03 or 19.09 installation. fsType = "zfs"; }; +#. Create a ``storageNNN-config.nix`` containing further configuration for the new host. +#. Add an entry for the new host to ``grid.nix`` referencing the new files. +#. Deploy to the new host with ``morph deploy morph/grid.nix --on <identifier> boot``. +#. Log on to the new host and reboot it. + #. Deploy the new configuration to the host:: morph deploy morph/grid.nix --on <identifier> switch --reboot diff --git a/morph/storage002-hardware.nix b/morph/storage002-hardware.nix index ab284ba9b4535ab08d7ab2ca95f23ef3fea0b8aa..4fc3a4097e05ec8c38c86db6bfce92e2a1af6f35 100644 --- a/morph/storage002-hardware.nix +++ b/morph/storage002-hardware.nix @@ -14,7 +14,7 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/9721366a-7f75-45b6-908a-cde68ed82295"; + { device = "/dev/disk/by-uuid/0e92ada9-effb-42e2-a26a-9cdb529bcdc7"; fsType = "ext4"; }; @@ -25,7 +25,14 @@ fsType = "zfs"; }; - swapDevices = [ ]; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/50b73d78-12cd-4599-a774-57af14e6d9f7"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f762b5e2-bbdd-4a02-bbd9-0bf6b11e0ab5"; } + ]; nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";