nixos/colony: Move to new thin pool for NVMe

This commit is contained in:
Jack O'Sullivan 2023-02-19 16:47:13 +00:00
parent c2634aff55
commit f17ed65cb8
3 changed files with 24 additions and 22 deletions

View File

@ -62,6 +62,7 @@
kernelModules = [ "kvm-amd" ];
kernelParams = [ "amd_iommu=on" "console=ttyS0,115200n8" "console=ttyS1,115200n8" "console=tty0" ];
initrd = {
kernelModules = [ "dm-raid" ];
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
};
};
@ -72,11 +73,11 @@
fsType = "vfat";
};
"/nix" = {
device = "/dev/hdds/tmp-colony-nix";
device = "/dev/main/colony-nix";
fsType = "ext4";
};
"/persist" = {
device = "/dev/hdds/tmp-colony-persist";
device = "/dev/main/colony-persist";
fsType = "ext4";
neededForBoot = true;
};

View File

@ -14,7 +14,7 @@
name = lv;
backend = {
driver = "host_device";
filename = "/dev/hdds/tmp-vm-${vm}-${lv}";
filename = "/dev/main/vm-${vm}-${lv}";
# It appears this needs to be set on the backend _and_ the format
discard = "unmap";
};
@ -139,24 +139,24 @@
(mkMerge [ (vmLVM "shill" "esp") { frontendOpts.bootindex = 0; } ])
(vmLVM "shill" "nix")
(vmLVM "shill" "persist")
{
name = "media";
backend = {
driver = "host_device";
filename = "/dev/hdds/media";
discard = "unmap";
};
format = {
driver = "raw";
discard = "unmap";
};
frontend = "virtio-blk";
}
# {
# name = "media";
# backend = {
# driver = "host_device";
# filename = "/dev/main/media";
# discard = "unmap";
# };
# format = {
# driver = "raw";
# discard = "unmap";
# };
# frontend = "virtio-blk";
# }
{
name = "minio";
backend = {
driver = "host_device";
filename = "/dev/hdds/tmp-minio";
filename = "/dev/main/minio";
discard = "unmap";
};
format = {
@ -186,7 +186,7 @@
name = "oci";
backend = {
driver = "host_device";
filename = "/dev/hdds/tmp-oci";
filename = "/dev/main/oci";
discard = "unmap";
};
format = {

View File

@ -76,10 +76,10 @@
fsType = "ext4";
neededForBoot = true;
};
"/mnt/media" = {
device = "/dev/disk/by-label/media";
fsType = "ext4";
};
# "/mnt/media" = {
# device = "/dev/disk/by-label/media";
# fsType = "ext4";
# };
"/mnt/minio" = {
device = "/dev/disk/by-label/minio";
fsType = "xfs";
@ -134,6 +134,7 @@
};
};
systemd.services."systemd-nspawn@jackflix".enable = false;
my = {
secrets.key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ6bc1pQCYalLXdB4X+7kFXtkTdFalbH5rchjuYj2ceU";
server.enable = true;