Configure disk
Summary
The disks of the target devices need to be configured before the rollout can start.
Requirements
-
SSH access from your setup device to all target devices
-
Double check that each machine has a hardware report saved under
machines/YOUR-MACHINE-NAME/facter.json
Configuring Target Disks
By default clan uses disko which allows for declarative disk partitioning.
To see what disk templates are available run:
$ clan templates list
Available 'clan' templates
├── <builtin>
│ ├── default: Initialize a new clan flake
│ ├── flake-parts: Flake-parts
│ ├── flake-parts-minimal: Minimal flake-parts clan template
│ └── minimal: for clans managed via (G)UI
Available 'disko' templates
├── <builtin>
│ └── single-disk: A simple ext4 disk with a single partition
Available 'machine' templates
├── <builtin>
│ ├── flash-installer: Initialize a new flash-installer machine
│ └── new-machine: Initialize a new machine
For this guide we will select the single-disk template, that uses A simple ext4 disk with a single partition.
Tip
For advanced partitioning, see Disko templates or Disko examples. You can also contribute a disk template to clan core
To setup a disk schema for a machine run
Which should fail and give the valid options for the specific hardware:
Invalid value for placeholder mainDisk - Valid options:
/dev/disk/by-id/nvme-WD_PC_SN740_SDDQNQD-512G-1201_232557804368
Re-run the command with the correct disk:
clan templates apply disk single-disk jon --set mainDisk "/dev/disk/by-id/nvme-WD_PC_SN740_SDDQNQD-512G-1201_232557804368"
Should now be successful
A disko.nix file is created in machines/jon
You can have a look and customize it if needed.
Danger
Don't change the disko.nix after the machine is installed for the first time, unless you really know what you are doing.
Changing disko configuration requires wiping and reinstalling the machine.
Checkpoint
Check your machines/ folders for the disk files. If a machine sub-folder does not contain a disk file, the setup ran into an error and needs to be restartet for the particular machine.
Up Next
After all preparations are done, we can now start the actual deployment process.