From 4dc099f51af33c7c9d1d984887e0dcbf6fa9e04b Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 4 Jan 2021 10:18:51 +0100 Subject: dnyarri: Fix unit names for btrfs scrub services Injecting pre/post start scripts into services called "btrfs-scrub-.service.service" isn't going to do a whole lot if the actual service name is called "btrfs-scrub-.service". During the last scrub I was wondering why caching got slow afterwards and found out that the caching devices were filled with lots of irrelevant data from the scrub. This led me to inspect what went wrong and when checking the properties of the scrub service unit, I found out that it never worked in the first place for the reason meantioned in the first paragraph. Actually using the right unit name helps a lot here, so onwards to the next scrub in February :-) Signed-off-by: aszlig --- machines/aszlig/dnyarri.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'machines/aszlig') diff --git a/machines/aszlig/dnyarri.nix b/machines/aszlig/dnyarri.nix index 3effb1b0..e61fe517 100644 --- a/machines/aszlig/dnyarri.nix +++ b/machines/aszlig/dnyarri.nix @@ -109,7 +109,7 @@ in { # services, so we don't get large amounts of nonsense on the caching device. systemd.services = let scrubServiceUnits = let - mkName = fs: "btrfs-scrub-${utils.escapeSystemdPath fs}.service"; + mkName = fs: "btrfs-scrub-${utils.escapeSystemdPath fs}"; in map mkName config.services.btrfs.autoScrub.fileSystems; in lib.genAttrs scrubServiceUnits (lib.const { preStart = bcacheStop; -- cgit 1.4.1