nixpkgs/pkgs/os-specific/linux
Ricardo M. Correia 12e77fdc3f nixos/zfs: Improve the ZFS boot process
It turns out that the upstream systemd services that import ZFS pools contain
serious bugs. The first major problem is that importing pools fails if there
are no pools to import. The second major problem is that if a pool ends up in
/etc/zfs/zpool.cache but it disappears from the system (e.g. if you
reboot but during the reboot you unplug your ZFS-formatted USB pen drive),
then the import service will always fail and it will be impossible to get rid
of the pool from the cache (unless you manually delete the cache).

Also, the upstream service would always import all available ZFS pools every
boot, which may not be what is desired in some cases.

This commit will solve these problems in the following ways:

1. Ignore /etc/zfs/zpool.cache. This seems to be a major source of
issues, and also does not play well with NixOS's philosophy of
reproducible configurations. Instead, on every boot NixOS will try to import
the set of pools that are specified in its configuration.  This is also the
direction that upstream is moving towards.

2. Instead of trying to import all ZFS pools, only import those that are
actually necessary. NixOS will automatically determine these from the
config.fileSystems.* option. Also, the user can import any additional
pools every boot by adding them to the config.boot.zfs.extraPools
option, but this is only necessary if their filesystems are not
specified in config.fileSystems.*.

3. Added options to configure if ZFS should force-import ZFS pools. This may
currently be necessary, especially if your pools have not been correctly
imported with a proper host id configuration (which is probably true for 99% of
current NixOS ZFS users). Once host id configuration becomes mandatory when
using ZFS in NixOS and we are sure that most users have updated their
configurations and rebooted at least once, we should disable force-import by
default. Probably, this shouldn't be done before the next stable release.

WARNING: This commit may change the order in which your non-ZFS vs ZFS
filesystems are mounted.  To avoid this problem (now or in the future)
it is recommended that you set the 'mountpoint' property of your ZFS
filesystems to 'legacy', and that you manage them using
config.fileSystems, just like any other non-ZFS filesystem is usually
managed in NixOS.
2014-11-12 22:31:49 +01:00
..
915resolution * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
acpi transformed meta.maintainers of some packages into lists 2014-09-13 13:52:02 +02:00
acpi-call Try to fix acpi_call for 3.17 2014-10-06 12:15:46 +04:00
acpid acpid: update from 2.0.22 to 2.0.23 2014-09-21 18:22:16 +01:00
acpitool Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
afuse Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
alienfx Add #include <unisted.h> for sleep and usleep 2014-01-25 13:46:48 -05:00
alsa-lib alsa: Add multilib plugin support via "libs" entry in asound config. 2014-10-04 14:48:58 +02:00
alsa-oss alsa{Oss,Utils}: update to 1.0.28 2014-06-20 10:12:43 +02:00
alsa-plugins Merge recent master into x-updates 2014-08-02 05:08:07 +02:00
alsa-utils alsa{Oss,Utils}: update to 1.0.28 2014-06-20 10:12:43 +02:00
apparmor Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
ati-drivers ati-driver: Fix "Catalyst Control Center" 2014-10-15 00:37:39 +02:00
atop Only update via external upstream information: nead to specify version format 2014-10-06 02:43:57 +04:00
audit audit: update from 2.4 to 2.4.1 2014-11-03 17:11:45 +00:00
autofs Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
batman-adv kernelPackages_3_17.{netatop,betman-adv}: disable 2014-10-10 21:35:26 +02:00
bbswitch Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
blcr Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
bluez change optionalString to optional in bluez5, fixes evalutation 2014-11-08 20:47:34 -08:00
bridge-utils bridge-utils: updated to version 1.5 2011-12-01 11:26:49 +00:00
broadcom-sta Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
busybox Move CIFS support into a separate module 2014-07-30 12:39:35 +02:00
can-utils can-utils: new package 2014-03-09 14:19:39 +01:00
checkpolicy selinux: update to 2014-05-06 2014-08-14 17:59:00 +02:00
checksec Make my packages slightly more consistent. 2014-03-07 20:27:02 -06:00
cifs-utils cifs_utils: update from 6.3 to 6.4 2014-10-06 21:49:44 +02:00
conky Fix many package descriptions 2014-08-24 22:31:37 +02:00
conntrack-tools Add conntrack-tools and missing dependencies. 2014-11-09 00:28:21 +01:00
consoletools linuxconsoletools: update from 1.4.6 to 1.4.7 2014-09-29 20:49:03 +02:00
conspy Update conspy; note the project move to SF.net 2014-08-31 20:18:53 +04:00
cpufrequtils Make cpufrequtils compilation pure. 2014-04-05 09:08:05 +02:00
cpupower Fixed many descriptions 2014-11-11 14:36:34 +01:00
cramfsswap * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
criu criu: upgrade to 1.3-rc2 2014-08-11 21:49:54 +03:00
cryopid
cryptodev Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
cryptsetup Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
dietlibc
directvnc
disk-indicator Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
dmidecode dmidecode: set meta.platforms to linux 2013-12-12 00:32:31 +01:00
dmraid dmraid: Fix install target in lib/Makefile.in. 2014-10-03 01:14:53 +02:00
dmtcp * Update dmtcp to version 1.2.0. 2011-02-22 19:00:45 +00:00
drbd Upgrade drbd from 8.4.0 -> 8.4.4 2013-11-28 00:52:12 -06:00
dstat Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
e3cfsprogs
e1000e Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
ebtables ebtables: Update to 2.0.10-4 and fix build 2013-01-28 17:19:01 +01:00
fbterm Upstream tracking files for asymptote and fbterm 2012-12-04 14:55:19 +04:00
ffado FFADO: fix build on i686 2014-08-24 19:50:22 +02:00
firejail Update Firejail 2014-11-02 23:51:58 +03:00
firmware Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
forktty Adding forktty terminal connection/disconnection helper 2013-10-20 20:27:50 +04:00
frandom Merge remote-tracking branch 'origin/master' into staging. 2014-08-04 16:51:47 +02:00
fuse transformed meta.maintainers of some packages into lists 2014-09-13 13:52:02 +02:00
fxload * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
gfxtablet Adding desktop side of GfxTablet tablet-as-input-device Android app 2013-10-22 09:30:49 +04:00
gogoclient Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
google-authenticator Merge remote-tracking branch 'origin/master' into staging. 2014-08-04 16:51:47 +02:00
gradm gradm: Update from 3.0-201405281853 -> 3.0-201408301734 2014-09-08 15:14:11 +02:00
guvcview add guvcview package 2014-02-07 00:01:40 +00:00
hdparm hdparm: fix expression 2014-09-30 11:26:23 +01:00
hibernate Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
hostapd Update hostapd 2014-10-12 12:34:16 +04:00
htop htop: Bump to 1.0.3 (close #2611) 2014-05-11 13:45:25 +02:00
hwdata Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
i7z Merge remote-tracking branch 'origin/master' into staging. 2014-08-04 16:51:47 +02:00
i810switch Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
ifenslave ifenslave: Add new package 2013-12-31 09:28:52 -06:00
ifplugd
iomelt Don't use ensureDir 2014-07-22 11:01:32 +02:00
iotop buildPythonPackage: fix more borken packages 2014-02-21 18:29:57 +01:00
iproute iproute: Remove stale patch 2014-10-19 17:53:41 -07:00
ipsec-tools ipsecTools: update from 0.8.1 to 0.8.2 2014-03-03 11:10:24 +01:00
iptables Update IPTables from 1.4.16.2 -> 1.4.20 2013-11-28 00:52:12 -06:00
iputils iputils: Don't depend on both GNU TLS and OpenSSL 2013-06-04 14:57:37 +02:00
iw iw: 3.14 -> 3.15 2014-09-09 21:29:43 -07:00
jujuutils Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
kbd kbd: Update to 1.15.3 2012-07-24 22:33:39 -04:00
kernel more kernel fixes 2014-11-11 09:22:18 +01:00
kernel-headers linux-headers: Add 3.14 2014-04-15 16:59:19 +02:00
kernel-headers-cross
kexectools kexec-tools: Update to 2.0.4 2013-09-12 10:38:37 +02:00
keyutils Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
klibc klibc: bump 2014-09-05 19:09:00 -04:00
kmod kmod: bump 2014-09-15 12:07:00 -04:00
kmod-blacklist-ubuntu kmod-blacklist-ubuntu: fix references to binaries 2014-02-02 09:45:59 +01:00
kmscon Add platforms for kmscon 2014-01-15 08:17:19 -05:00
ktap Fixed many descriptions 2014-11-11 14:36:34 +01:00
latencytop Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
ldm ldm: Bump to 0.5. 2014-08-12 13:52:48 +02:00
libaio libaio: update to 0.3.110 2014-08-29 13:45:04 +01:00
libatasmart Upgrade libatasmart from 0.17 -> 0.19 2013-11-29 02:08:52 -06:00
libcap Rename buildNativeInputs -> nativeBuildInputs 2012-12-28 19:20:09 +01:00
libcap-ng Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
libcgroup Rename buildNativeInputs -> nativeBuildInputs 2012-12-28 19:20:09 +01:00
libnl Adding libnl 3.2.19 to use instead of the latest with ntrack 2013-12-02 22:47:52 +04:00
libnscd
libselinux selinux: update to 2014-05-06 2014-08-14 17:59:00 +02:00
libsemanage selinux: update to 2014-05-06 2014-08-14 17:59:00 +02:00
libsepol selinux: update to 2014-05-06 2014-08-14 17:59:00 +02:00
libsmbios synchronize with trunk 2011-10-06 10:27:33 +00:00
libvolume_id libvolume_id: update from 0.81.0 to 0.81.1 2013-12-13 22:41:58 +02:00
light Add "light" package and setuid wrapper 2014-11-09 19:45:43 -07:00
lightum Add Lightum package: MacBook light sensor daemon 2014-11-11 10:22:08 -07:00
lm-sensors lm_sensors: update from 3.3.4 to 3.3.5 2014-02-04 21:58:25 +02:00
lockdep lockdep: 3.16.1 -> 3.17 2014-10-09 16:59:14 -05:00
lsiutil Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
lsscsi lsscsi: update from 0.24 to 0.27 2013-12-14 00:16:59 +02:00
lttng-modules fixes #1933 2014-10-23 00:14:09 +02:00
lvm2 Update LVM2 2014-09-24 13:39:08 +04:00
lxc Add support for global LXC config files 2014-10-18 05:02:39 +02:00
mcelog Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
mdadm Revert "mdadm: update from 3.3 to 3.3.2" 2014-10-09 18:34:37 +02:00
microcode Upgrade: Intel microcodes -> 20160624 2014-08-17 00:11:43 +02:00
mingetty * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
module-init-tools Kernel module aggregator: Use kmod instead of module-init-tools 2013-08-09 18:48:52 +02:00
multipath-tools udev-173, patch 2011-08-18 13:04:55 +00:00
musl musl: 1.0.0 -> 1.1.4 2014-08-20 01:55:02 -05:00
ndiswrapper Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
net-tools Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
netatop kernelPackages_3_17.{netatop,betman-adv}: disable 2014-10-10 21:35:26 +02:00
nfs-utils nfs-utils: add missing python dependency 2014-09-30 18:40:35 +02:00
nftables nftables: Add derivation 2014-08-25 14:55:15 +02:00
nss_ldap nss_ldap: fixing crash with glibc >= 2.16 2013-05-17 10:23:37 +02:00
numactl * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
nvidia-x11 nvidia: fix problems with -glsi and glx 2014-08-20 23:37:41 +02:00
nvidiabl Now properly add nvidiabl. 2014-03-07 16:08:38 +01:00
open-iscsi Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
opengl/xorg-sys * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
openvswitch Don't specify Perl version 2014-09-02 03:04:17 +04:00
otpw Merge remote-tracking branch 'origin/master' into staging. 2014-08-04 16:51:47 +02:00
pam pam: upstream patch to fix CVE-2014-2583 2014-05-03 21:30:48 +02:00
pam_ccreds More description fixes 2013-10-06 12:01:38 +02:00
pam_console pam_console: fix version to match tarball 2013-07-14 02:08:51 +03:00
pam_devperm
pam_krb5 transformed meta.maintainers of some packages into lists 2014-09-13 13:52:02 +02:00
pam_ldap change md5sum to sha256sum for a few packages 2014-10-12 16:13:21 +02:00
pam_login
pam_mount Fix description in pam_mount and libHX. Add tstrobel as maintainer. 2014-09-15 12:30:19 +02:00
pam_ssh_agent_auth pam_ssh_agent_auth: fix nix eval 2013-05-23 15:24:15 +02:00
pam_usb Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
pax-utils pax-utils: Update from 0.8.1 -> 0.9.1 2014-10-22 16:47:09 +02:00
paxctl paxctl: Update from 0.8 -> 0.9 2014-09-08 15:14:48 +02:00
pcmciautils Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
plymouth Plymouth: update to 0.9.0, fix build, sanitize, enable systemd-integration 2014-05-29 14:39:37 +02:00
pm-utils Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
pmount Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
pmtools Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
policycoreutils policycoreutils: fix build on i686 for ZHF 2014-08-21 17:29:51 +02:00
pommed Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
powertop Upgrade: powertop: 2.5 -> 2.6.1 2014-08-14 12:54:21 +02:00
prl-tools prl-tools: add package 2014-11-12 01:26:23 +03:00
procps Add a recipe for installing "watch" from procps (#2227) 2014-04-14 09:10:10 -05:00
procps-ng make top less red 2014-10-22 21:21:01 +02:00
psmisc psmisc: (from upstream) Typo in fuser makes -M on all the time 2014-04-27 20:19:31 +02:00
psmouse-alps Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
radeontools Fix broken license references. 2014-07-28 11:43:20 +02:00
regionset * Added regionset, a tool for changing the region code setting of DVD 2011-10-21 00:43:56 +00:00
reptyr reptyr: version 0.5 2014-02-19 15:05:36 -06:00
rfkill Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
rtkit rtkit: Update from 0.10 to 0.11 2014-04-21 23:22:10 +02:00
s6-linux-utils Fixed many descriptions 2014-11-11 14:36:34 +01:00
sdparm Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
sepolgen Upgrade selinux from 20100904 -> 20131030 2013-11-29 02:08:53 -06:00
setools selinux: update to 2014-05-06 2014-08-14 17:59:00 +02:00
seturgent seturgent: new package 2014-09-30 09:53:52 +01:00
shadow Upgrade shadow package 2014-08-01 21:19:21 +03:00
smem smem: Add package 2014-09-11 22:20:02 +02:00
spl spl: Backport compatibility patches for newer kernels 2014-10-07 16:52:14 +02:00
statifier Even more mirror:// fixes 2013-07-14 04:17:07 +03:00
sysdig Update SysDig 2014-11-02 23:51:58 +03:00
sysfsutils Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
sysklogd sysklogd: update from 1.5 to 1.5.1, potentially fixes CVE-2014-3634, CVE-2014-3683 2014-11-04 10:18:52 +01:00
syslinux Revert "syslinux: disable parallel building" 2014-11-05 13:24:01 +01:00
sysstat Fixed buidling sysstat 2014-10-09 21:59:53 +04:00
systemd systemd: Fix uninitialised memory issue in veth setup 2014-08-15 04:07:45 +02:00
sysvinit sysvtools: fix symlink when withoutInitTools = false 2013-05-09 15:15:04 +02:00
tcp-wrappers Remove duplicate tcp-wrappers package 2012-11-29 15:26:13 +01:00
tp_smapi Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
ttysnoop Fix license attribute in ttysnoop 2013-10-20 21:15:14 +04:00
tunctl Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
uclibc Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
udev Remove udev 173 2012-12-13 11:42:00 +01:00
udisks udisks: update from 1.0.4 to 1.0.5 2014-10-06 22:23:00 +02:00
udisks-glue Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
untie Adding untie - a tool for manipulating namespaces 2010-11-23 07:52:57 +00:00
upower upower: pull patches used in Ubuntu/trusty (fix #2884) 2014-06-19 20:51:30 +02:00
upstart change md5sum to sha256sum for a few packages 2014-10-12 16:13:21 +02:00
usbutils usbutils: Update USB IDs 2013-10-14 12:47:04 +02:00
usermount Fixed many descriptions 2014-11-11 14:36:34 +01:00
util-linux util-linux: bump 2014-09-16 11:53:20 -04:00
v4l2loopback typo 2014-04-02 12:40:59 +02:00
v4l-utils Turn more licenses into lib.licenses style 2014-11-06 00:48:16 +00:00
v86d Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
wireless-tools
wis-go7007 Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
wpa_supplicant Update wpa_supplicant 2014-10-12 12:34:16 +04:00
wvdial Fix wvdial build by inserting missing unistd.h includes 2014-02-02 19:21:08 +04:00
x86info Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
xf86-input-mtrack Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
xf86-input-multitouch Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
xf86-input-wacom xf86_input_wacom: update from 0.26.99.1 to 0.27.0 2014-11-12 20:56:38 +01:00
xf86-video-nested Tidy up: use the web interface for the git repo as the homepage 2013-03-03 19:40:17 +01:00
zfs nixos/zfs: Improve the ZFS boot process 2014-11-12 22:31:49 +01:00