frumar: switch main disk to ssdpool

master
Yorick van Pelt 2023-07-22 12:28:33 +02:00
parent dd3fcc85b2
commit b19cf6f2f6
Signed by: yorick
GPG Key ID: D8D3CC6D951384DE
2 changed files with 80 additions and 11 deletions

View File

@ -242,7 +242,6 @@
};
systemd.services.grafana.serviceConfig.EnvironmentFile = config.age.secrets.grafana.path;
services.zfs = {
trim.enable = false; # no ssd's
autoScrub = {
enable = true;
interval = "*-*-01 02:00:00"; # monthly + 2 hours
@ -292,6 +291,16 @@
"frumar-new/plexmedia" = {
plan = "1w=>6h,1m=>1w,1y=>1m,2y=>6m,50y=>1y";
};
"ssdpool/root" = {
plan = "2d=>1d";
};
"ssdpool/root/var" = {
plan = "1w=>1d";
destinations.frumar-new = {
dataset = "frumar-new/backup/ssdpool-root-var";
plan = "1w=>1d,1m=>1w,1y=>1m,10y=>6m,50y=>1y";
};
};
};
};
users.users.plex.packages = with pkgs; [

View File

@ -4,22 +4,26 @@
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules =
[ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
[ "nvme" "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
# Use the GRUB 2 boot loader.
boot.loader.grub = {
enable = true;
# Define on which hard drive you want to install Grub.
device = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAG441016B";
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{ path = "/boot1"; devices = [ "nodev" ]; }
{ path = "/boot2"; devices = [ "nodev" ]; }
];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/ba95c638-f243-48ee-ae81-0c70884e7e74";
fsType = "ext4";
options = [ "defaults" "relatime" "discard" ];
};
# fileSystems."/" = {
# device = "/dev/disk/by-uuid/ba95c638-f243-48ee-ae81-0c70884e7e74";
# fsType = "ext4";
# options = [ "defaults" "relatime" "discard" ];
# };
swapDevices = [{ device = "/dev/disk/by-label/ssd-swap"; }];
swapDevices = [{ device = "/dev/disk/by-label/nixos-swap"; }];
fileSystems."/data" = {
device = "frumar-new";
fsType = "zfs";
@ -30,6 +34,62 @@
fsType = "zfs";
};
fileSystems."/boot1" = {
device = "/dev/disk/by-label/EFI1";
fsType = "vfat";
};
fileSystems."/boot2" = {
device = "/dev/disk/by-label/EFI2";
fsType = "vfat";
};
fileSystems."/" = {
device = "ssdpool/root";
fsType = "zfs";
};
fileSystems."/var" = {
device = "ssdpool/root/var";
fsType = "zfs";
};
fileSystems."/home/yorick/rtorrent" = {
device = "ssdpool/torrent";
fsType = "zfs";
};
nix.settings.max-jobs = 4;
services.avahi.allowInterfaces = [ "enp2s0" ];
}
## disk layout
# 1x SATA Samsung 850 Evo, 250GB (old ssd)
# - 248GB root ext4
# - 1.9GB swap
# - 0.1GB bios_grub
# 3x SATA WDC WD100EMAZ-00WJTA0, 10.0TB
# - 9.1TiB zfs, frumar-new
# - 8MiB empty
# 1x nvme Corsair Force MP510, 960G
# - 2 GiB "EFI1" boot, ESP
# - 858GB "ssdpart1" zfs, ssdpool
# - 100GB "buf1" empty, future use (metadata device?)
# 1x nvme Samsung Evo 980, 1000G
# - 2GiB "EFI2" boot, ESP
# - 858GB "ssdpart2" zfs, ssdpool
# - 100GB "buf2" empty, future use (metadata device?)
# - 8GiB "swap" swap
# - 31.4GB "scratch" empty, future use
## zfs layout
### frumar-new
# frumar-new: 30T, 20T usable, mountpoint=/data, snapshotted
# frumar-new/backup, mount=none
# frumar-new/backup/blackadder, mount=none
# znapzends from blackadder:rpool/home-enc, encrypted and compressed at-rest there
# frumar-new/plexmedia, mountpoint=/data/plexmedia, snapshotted, different blocksize
### ssdpool
# ssdpool: 858G
# ssdpool/root: compressed
# ssdpool/root/var: compressed, snapshotted
# ssdpool/torrent: not compressed, not snapshottend