Results 1 to 9 of 9

Thread: NFS issues

  1. #1
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    NFS issues

    Hi,

    I have some issues with NFS...
    Installed 2 servers - One 12.04 LTS (server1) and one 16.04 LTS (server2).

    The idea is to gradually move over from the old server1 to server2.
    Therefor I have set up /etc/exports like this on server1:
    Code:
    /mediadisk  192.168.1.0/24(ro,async,fsid=0)
    /home	  192.168.1.0/24(rw,async,fsid=0)
    /datadisk	 192.168.1.0/24(ro,async,fsid=0)
    /data	 192.168.1.0/24(ro,async,fsid=0)
    In /etc/fstab on server2:
    Code:
    192.168.1.4:/   /home   nfs4    auto  0  0
    192.168.1.4:/   /mediadisk   nfs4    auto  0  0
    192.168.1.4:/   /datadisk   nfs4    auto  0  0
    192.168.1.4:/   /data   nfs4    auto  0  0
    But it is only mediadisk that is mapped to all the directories.
    In older versions of NFS i was used to write the lines in fstab like this:
    Code:
    192.168.1.4:/home   /home   nfs4    auto  0  0
    192.168.1.4:/mediadisk   /mediadisk   nfs4    auto  0  0
    192.168.1.4:/datadisk   /datadisk   nfs4    auto  0  0
    192.168.1.4:/data   /data   nfs4    auto  0  0
    This makes sense.
    However I get this error when doing mount -a:
    Code:
    mount.nfs4: mounting 192.168.1.4:/home failed, reason given by server: No such file or directory
    mount.nfs4: mounting 192.168.1.4:/mediadisk failed, reason given by server: No such file or directory
    mount.nfs4: mounting 192.168.1.4:/datadisk failed, reason given by server: No such file or directory
    mount.nfs4: mounting 192.168.1.4:/data failed, reason given by server: No such file or directory
    How can I do this the way I want?
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  2. #2
    Join Date
    Jun 2014
    Beans
    4,470

    Re: NFS issues

    The fstab file you show on server 2 has mount points in the / (root) of your filesystem for: /home, /mediadisk, datadisk and data. Do those directory mount points exitst? Exporting /home from one computer to the /home directory of the current system is going to be problematic at best. It would make more sense to create those mount points under the /mnt directory. Also, it shows that you are trying to mount the entire root filesystem of the other computer to each of the mount points. Something like below should work based on your exports file:

    192.168.1.4:/home /mnt/home nfs4 auto 0 0
    192.168.1.4:/mediadisk /mnt/mediadisk nfs4 auto 0 0
    192.168.1.4:/datadisk /mnt/datadisk nfs4 auto 0 0
    192.168.1.4:/data /mnt/data nfs4 auto 0 0

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,197
    Distro
    Kubuntu Development Release

    Re: NFS issues

    I believe you can only have one file system with fsid=0. From "man exports"
    For NFSv4, there is a distinguished filesystem which is the root of all exported filesystem. This is specified with fsid=root or fsid=0 both of which mean exactly the same thing.

    Other filesystems can be identified with a small integer, or a UUID which should contain 32 hex digits and arbitrary punctuation.
    Try giving each filesystem a different fsid, like fsid=1 for the mediadisk export. I think that worked for me when I tried NFSv4. I'm still using v3 for my home/office network.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NFS issues

    Quote Originally Posted by yancek View Post
    The fstab file you show on server 2 has mount points in the / (root) of your filesystem for: /home, /mediadisk, datadisk and data. Do those directory mount points exitst? Exporting /home from one computer to the /home directory of the current system is going to be problematic at best. It would make more sense to create those mount points under the /mnt directory. Also, it shows that you are trying to mount the entire root filesystem of the other computer to each of the mount points. Something like below should work based on your exports file:
    Like I said in my post, I have already tried this. This is the way I am used to do it.
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  5. #5
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NFS issues

    Quote Originally Posted by SeijiSensei View Post
    I believe you can only have one file system with fsid=0. From "man exports"


    Try giving each filesystem a different fsid, like fsid=1 for the mediadisk export. I think that worked for me when I tried NFSv4. I'm still using v3 for my home/office network.
    Tried this, but it doesn't seem to work.
    How can I still use v3? It is v3 on server1, but v4 on the new server.
    I would like it to work the same way I am used to.

    Edit:
    Tried this:
    Exports
    Code:
    /home	192.168.1.0/24(rw,async,fsid=0,no_subtree_check)
    /mediadisk	192.168.1.0/24(rw,async,fsid=1,no_subtree_check)
    fstab
    Code:
    192.168.1.4:/home   /home   nfs  vers=3  auto  0  0
    192.168.1.4:/mediadisk   /mediadisk   nfs  vers=3  auto  0  0
    The error is now:
    Code:
    mount.nfs: Protocol not supported
    mount.nfs: Protocol not supported
    Last edited by asai; July 14th, 2017 at 05:08 PM.
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  6. #6
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NFS issues

    I don't understand this.
    I had a new look at the documentation here:
    https://help.ubuntu.com/lts/servergu...le-system.html

    It is exactly the way I set it up i the first place. I can't see the problem.
    Anyone have an idea?
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  7. #7
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NFS issues

    Gave up...
    Installed 12.04 LTS server instead.
    Works perfect now.
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  8. #8
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: NFS issues

    12.04 is no longer supported and no longer receives any updates, including security updates.

  9. #9
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NFS issues

    Yes I know, and I will upgrade my server soon. I possibly wait for the next LTS. 18.04?
    I have been very satisfied with my 12.04 server. Installed the system on my current server summer 2012. Have been running without any problems ever since. Therefor I am a bit careful with the upgrade.
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •