Can anyone help me out of a very stupid situation which is totally my fault (well almost).
I added another NFS shared via the GUI and for some reason it failed, not totally sure why as NFS has been running
fine for ages (over 70 days uptime!) the error message was complaining about duplicate entries in /etc/exports
So thinking that I could fix the problem. Checked /etc/exports and notice duplicate entries so removed those and then restarted the NFS-Kernel-Server and got the following error
sudo service nfs-kernel-server start
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)rpc.nfsd: writing fd to kernel failed: errno 5 (Input/output error)
rpc.nfsd: unable to set any sockets for nfsd
So tried clearing the exports file, so it looks like this
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
Then checked hosts.allow
cat /etc/hosts.allow
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
192.168.1.*
Alles anzeigen
and hosts.deny
cat /etc/hosts.deny
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: some.host.name, .some.domain
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID
Alles anzeigen
So all good there (i think)
checked port map and no complaints
checked nfs-common
checked rpcinfo -p
sudo rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
Bit of googling and checked rpc-nfsd
sudo rpc.nfsd -d
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: +4.1 +2 +3 +4
rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: Creating inet TCP socket.
rpc.nfsd: writing fd to kernel failed: errno 5 (Input/output error)
rpc.nfsd: unable to set any sockets for nfsd
Then checked mount
Dmesg gives me this
dmesg | tail
[263235.001034] rpcbind: server localhost not responding, timed out
[263235.001082] svc: failed to register nfsdv2 RPC service (errno 5).
[263502.076040] rpcbind: server localhost not responding, timed out
[263502.076090] svc: failed to register nfsdv2 RPC service (errno 5).
[263705.408042] rpcbind: server localhost not responding, timed out
[263705.408087] svc: failed to register nfsdv2 RPC service (errno 5).
[264614.988050] rpcbind: server localhost not responding, timed out
[264614.988100] svc: failed to register nfsdv2 RPC service (errno 5).
[265864.433865] rpcbind: server localhost not responding, timed out
[265864.433920] svc: failed to register nfsdv2 RPC service (errno 5).
Alles anzeigen
Daemon log looks like this
sudo cat /var/log/daemon.log
rpcbind: Cannot open '/var/run/rpcbind/rpcbind.xdr' file for reading, errno 2 (No such file or directory)
rpcbind: Cannot open '/var/run/rpcbind/portmap.xdr' file for reading, errno 2 (No such file or directory)
Checked that RPCBind was working and no errors
Version of NFS Common, NFS Kernel Serverm Portmap
dpkg -l portmap nfs-common nfs-kernel-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================================-================================-================================================================================
ii nfs-common 1:1.2.2-4squeeze2 NFS support files common to client and server
iF nfs-kernel-server 1:1.2.2-4squeeze2 support for NFS kernel server
rc portmap 6.0.0-2 RPC port mapper
So I save the very best bit and the most stupid, stupidly, stupidly, tried to remove nfs kernel server but rather than remove I chose the try purge and DIDN'T read the message properly :oops: and have accidental removed Open Media Vault.
The server is working and I can still access the data but fear that I might of really broke something. The server has 4 x 500g drives in a RAID 5 with an LVM on top.
So not sure what to do now as I can't reinstall Open Media Vault as it depends on NFS-Kernel-Server and that fails...
sudo apt-get install openmediavault
Reading package lists... Done
Building dependency tree
Reading state information... Done
openmediavault is already the newest version.
The following packages were automatically installed and are no longer required:
dnsmasq-base libgutenprint2 openprinting-ppds libcupsppdc1 foomatic-db-engine libcupscgi1 poppler-utils libcupsdriver1 hplip-cups transmission-cli
ghostscript-cups transmission-daemon hpijs foomatic-filters cups-client bc dc libslp1 python-lxml cups-ppdc transmission-common cups-common libhpmud0
libijs-0.35 cups-driver-gutenprint splix libpoppler5 cups foo2zjs dnsmasq foomatic-filters-ppds python-cups hp-ppd foomatic-db libevent-2.0-5
libcupsmime1 hpijs-ppds
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up nfs-kernel-server (1:1.2.2-4squeeze2) ...
Starting NFS common utilities: statd.
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 5 (Input/output error)
rpc.nfsd: unable to set any sockets for nfsd
failed!
invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
dpkg: error processing nfs-kernel-server (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
dpkg: dependency problems prevent configuration of openmediavault:
openmediavault depends on nfs-kernel-server; however:
Package nfs-kernel-server is not configured yet.
dpkg: error processing openmediavault (--configure):
dependency problems - leaving unconfigured
configured to not write apport reports
Errors were encountered while processing:
nfs-kernel-server
openmediavault
E: Sub-process /usr/bin/dpkg returned an error code (1)
Alles anzeigen
Help! :o Bit lost now