nixpkgs/pkgs/stdenv
Ricardo M. Correia e9affb4274 nixos: Add system-wide option to set the hostid
The old boot.spl.hostid option was not working correctly due to an
upstream bug.

Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.

The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.

The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.

The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
2014-11-12 22:31:49 +01:00
..
generic nixos: Add system-wide option to set the hostid 2014-11-12 22:31:49 +01:00
linux Fix zlib handling in stdenvLinux 2014-08-26 17:17:13 +02:00
native Add SmartOS native GCC path. 2013-02-28 20:04:04 +01:00
nix Doh 2014-07-28 09:37:23 +02:00
adapters.nix Typo/comment 2014-04-22 18:42:44 +02:00
common-path.nix * Don't use the "replace-literal" command in stdenv; instead use 2012-01-19 13:47:26 +00:00
default.nix Remove the unmaintained (and AFAIK unused) stdenv for mingw 2014-06-30 13:31:08 +02:00