nixos/zfs: scrub synchronously

This prevents spurious systemd failures if the timer unit starts a new
scrub before a long-running one has finished.
This commit is contained in:
Sarah Brofeldt
2022-08-09 07:06:09 +02:00
parent 39d7f929fb
commit ab2e77ea82

View File

@@ -765,10 +765,10 @@ in
description = "ZFS pools scrubbing"; description = "ZFS pools scrubbing";
after = [ "zfs-import.target" ]; after = [ "zfs-import.target" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "simple";
}; };
script = '' script = ''
${cfgZfs.package}/bin/zpool scrub ${ ${cfgZfs.package}/bin/zpool scrub -w ${
if cfgScrub.pools != [] then if cfgScrub.pools != [] then
(concatStringsSep " " cfgScrub.pools) (concatStringsSep " " cfgScrub.pools)
else else