Various NFS server fixes:

- Added rpc.statd service, which prevents messages that tell you that you should use -o nolock
- Create /var/lib/nfs on initialization
- Create /etc/exports, so that exportfs can create /var/lib/nfs/etab. This prevents errors such as: mount.nfs: an incorrect mount option was specified


svn path=/nixos/trunk/; revision=16953
This commit is contained in:
Sander van der Burg 2009-09-03 14:47:58 +00:00
parent 2b5c9a78ff
commit 9843fa2ed7

View file

@ -64,6 +64,11 @@ mkIf config.services.nfsKernel.enable {
options
];
environment.etc = [
{ source = exports;
target = "exports"; }
];
services = {
extraJobs = [
{
@ -77,15 +82,17 @@ mkIf config.services.nfsKernel.enable {
start script
export PATH=${pkgs.nfsUtils}/sbin
mkdir -p /var/lib/nfs
${modprobe}/sbin/modprobe nfsd || true
exportfs -a
exportfs -ra
end script
respawn sleep 1000000
start script
mkdir -p /var/lib/nfs
export PATH=${pkgs.nfsUtils}/sbin
exportfs -au
exportfs -ra
end script
'';
}
@ -113,6 +120,22 @@ mkIf config.services.nfsKernel.enable {
respawn ${pkgs.nfsUtils}/sbin/rpc.mountd -F -f ${exports}
'';
}
{
name = "nfs-kernel-statd";
job = ''
description "NSM (Network Status Monitor) of the RPC protocol"
start on nfs-kernel-rpc-nfsd/started
stop on nfs-kernel-exports/stop
start script
mkdir -p /var/lib/nfs
end script
respawn ${pkgs.nfsUtils}/sbin/rpc.statd
'';
}
];
};
}