mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
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:
parent
2b5c9a78ff
commit
9843fa2ed7
1 changed files with 25 additions and 2 deletions
|
@ -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
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue