fix zfs race condition

This commit is contained in:
waveringana 2025-06-02 21:51:56 -04:00
parent 7c4dd94c2e
commit d9bf94b864
Signed by: waveringana
SSH key fingerprint: SHA256:i9wBeOYE6M0IXu5FqJ2f5moBn/QvA2SNwME+b3DzZFU
2 changed files with 31 additions and 2 deletions

View file

@ -50,6 +50,35 @@
boot.supportedFilesystems = [ "zfs" ];
boot.kernelModules = [ "nct6775" "coretemp" ];
boot.zfs.extraPools = [ "garage" "storage" ];
boot.zfs.devNodes = "/dev/disk/by-id";
boot.zfs.forceImportAll = true;
systemd.services.zfs-import-cache.enable = false;
systemd.services.zfs-import-scan.enable = true;
systemd.services.zfs-import-scan = {
after = [ "systemd-udev-settle.service" ];
wants = [ "systemd-udev-settle.service" ];
};
systemd.mounts = [
{
what = "garage";
where = "/garage";
type = "zfs";
after = [ "zfs-import-scan.service" ];
wants = [ "zfs-import-scan.service" ];
}
{
what = "storage";
where = "/storage";
type = "zfs";
after = [ "zfs-import-scan.service" ];
wants = [ "zfs-import-scan.service" ];
}
];
services.zfs.autoScrub.enable = true;
services.zfs.trim.enable = true;