NFS Issues

  • 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


    Code
    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


    Code
    # /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


    and hosts.deny


    So all good there (i think)


    checked port map and no complaints

    Code
    sudo service portmap start


    checked nfs-common

    Code
    sudo service nfs-common status
    all daemons running


    checked rpcinfo -p

    Code
    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

    Code
    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

    Code
    mount | grep nfs
    nfsd on /proc/fs/nfsd type nfsd (rw)


    Dmesg gives me this


    Daemon log looks like this

    Code
    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

    Code
    sudo service rpcbind restart
    Stopping rpcbind daemon....
    Starting rpcbind daemon....


    Version of NFS Common, NFS Kernel Serverm Portmap

    Code
    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...



    Help! :o Bit lost now

  • Man of Kent,


    I would try this..


    apt-get -f install
    dpkg --configure ntfs-kernel-server
    apt-get install openmediavault --reinstall


    PS-if all your configs were purged it will be hard to get this Humpty back together again.

  • Thanks Tekkbebe


    apt-get -f install still gave the same error
    dpkg --configure ntfs-kernel-server failed same error
    apt-get install openmediavault --reinstall failed due to a broken nfs-kernel-server


    Thanks for the pointers and it does seem that Humpty is indeed broken and all of the kings men can't help this time!


    Looks like I have a busy weekend ahead, just a quick question, will the LVM and RAID be detected by the new install?


    Kentish

  • Yes on the lvm and raid, turn off your OMV and disconnect all the data disks. Leave system disk connected and reinstall OMV. Then turn off and reconnect data disks. Your raid should be recognized and then take your time putting Humpty back together. Think it out.


    Good Luck...

  • Cheers, I thought that would be the case.


    Find it slightly funny as I managed to add another drive to the RAID the other day, grow the LVM and associated filesystem which went well with no problems but add another share to system and I break the whole thing!


    I will most probably replace the system drive as it's an old IDE drive. Oh well painful learning experience due to not reading the messages properly!!


    Cheers

  • You could look over the file and see things that were Setup. So you could set them up maybe faster, or if you miss something you would see it there.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Sadly it don't work that way.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!