[Nix-dev] Installing /nix on nfs-mounted volume possible?

Eelco Dolstra eelco.dolstra at logicblox.com
Wed Feb 10 16:04:37 CET 2016


Hi,

On 08/02/16 19:15, Wout Mertens wrote:

> The problem with nfs nix stores is that the metadata is stored in sqlite, which
> can't guarantee proper locking on nfs. However, if you only write from one host,
> there is no problem.

IIRC, SQLite *should* work if you disable WAL mode (by adding "use-sqlite-wal =
false" to nix.conf). But I haven't tested that.

Another possibility, also untested, would be to mount /nix/store via NFS, and
then forward the Nix daemon socket over the network in some way. E.g., you could
use some socat magic to connect /nix/var/nix/daemon-socket/socket on the clients
to the same file on the server. We do something like that for NixOS containers:
the containers have a read-only /nix/store bind mount, but they can still do Nix
operations because the host's /nix/var/nix/daemon-socket/socket is bind-mounted
into the container.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list