summary refs log tree commit diff
path: root/modules/tasks/filesystems/zfs.nix
diff options
context:
space:
mode:
authorJack Cummings <jack@mudshark.org>2013-06-07 09:34:46 -0700
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-15 16:23:59 +0200
commitdeb7c6d35bffd569e137be72312089ad7515f2c4 (patch)
tree4e5844e0096fbd3c08f1a566196d86a1d0e0b87c /modules/tasks/filesystems/zfs.nix
parentb703aee0ec0fc9ba5212c1986a3458ba473526e7 (diff)
downloadnixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar.gz
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar.bz2
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar.lz
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar.xz
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.tar.zst
nixpkgs-deb7c6d35bffd569e137be72312089ad7515f2c4.zip
don't try to re-import pools on service change
When nixos-rebuild grabs a new kernel, it will build new spl/zfs
modules, which will change the service. On completion nixos will try and
restart the services which will try and import pools again, and
generally will fail.

The pools are already imported, we don't need to do it again..
Diffstat (limited to 'modules/tasks/filesystems/zfs.nix')
-rw-r--r--modules/tasks/filesystems/zfs.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/tasks/filesystems/zfs.nix b/modules/tasks/filesystems/zfs.nix
index b76c50f420f..7fc84bb2ac8 100644
--- a/modules/tasks/filesystems/zfs.nix
+++ b/modules/tasks/filesystems/zfs.nix
@@ -69,6 +69,7 @@ in
       serviceConfig = {
         Type = "oneshot";
         RemainAfterExit = true;
+        restartIfChanged = false;
         ExecStart = "${kernel.zfs}/sbin/zpool import -f -a -d /dev";
       };
     };
@@ -84,8 +85,8 @@ in
         ExecStop = "${kernel.zfs}/sbin/zfs umount -a";
       };
     };
- 
-    system.fsPackages = [ kernel.zfs ];                  # XXX: needed? zfs doesn't have a fsck
+
+    system.fsPackages = [ kernel.zfs ];                  # XXX: needed? zfs doesn't have (need) a fsck
     environment.systemPackages = [ kernel.zfs ];
     services.udev.packages = [ kernel.zfs ];             # to hook zvol naming, etc. 
   };