Announcement

Collapse
No announcement yet.

nfs no longer working under 13.04

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    nfs no longer working under 13.04

    finally got my laptop and desktop upgraded to 13.04 from 12.04. nfs worked fine under 12.04, but doesn't under 13.04.

    Anybody else having trouble with nfs under 13.04.

    The files /etc/exports, /etc/hosts.allow and /etc/hosts.deny are all as they were under 12.04. /etc/gstab is also the same.

    If I do a manual mount, I get the following:

    mount /home/Acer/usr/local/bin
    mount.nfs: rpc.statd is not running but is required for remote locking.
    mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
    mount.nfs: an incorrect mount option was specified

    I have done rpcinfo -p on both the laptop and desktop and statd is listed as running as is nfs, etc. On the desktop I get:

    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
    100003 2 tcp 2049 nfs
    100003 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 2 tcp 2049
    100227 3 tcp 2049
    100003 2 udp 2049 nfs
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100227 2 udp 2049
    100227 3 udp 2049
    100021 1 udp 47907 nlockmgr
    100021 3 udp 47907 nlockmgr
    100021 4 udp 47907 nlockmgr
    100021 1 tcp 39747 nlockmgr
    100021 3 tcp 39747 nlockmgr
    100021 4 tcp 39747 nlockmgr
    100005 1 udp 35442 mountd
    100005 1 tcp 59382 mountd
    100005 2 udp 34752 mountd
    100005 2 tcp 35234 mountd
    100024 1 udp 52294 status
    100024 1 tcp 41343 status

    Similar results on the laptop.

    If I examine /proc/fs/nfs/exports, it isn't complete. I get:
    cat /proc/fs/nfs/exports
    # Version 1.1
    # Path Client(Flags) # IPs
    /home/terry 192.168.0.3(rw,root_squash,sync,wdelay,no_subtree_ check,uuid=a6fb5bf4:341a4443:98b2427b:c84e62f7)
    /home 192.168.0.3(ro,root_squash,sync,no_wdelay,no_subtr ee_check,v4root,uuid=a6fb5bf4:341a4443:98b2427b:c8 4e62f7)


    If I try to get rpcinfo on the laptop from the desktop, I get:

    rpcinfo -p 192.168.0.3
    rpcinfo: can't contact portmapper: RPC: Authentication error; why = Client credential too weak

    I have done a Google on that, but nothing useful.

    Any suggestions on how to get nfs working again??

    #2
    Newer Ubuntu NFS is version 4. The exports work differently than with version 3. Try googling a bit on it. I believe you can force version 3 compatibility or just re-configure your setup for version 4 (a longer range solution). I'm not at my linux machine right now, but I'll check back in later tonight when I can with more info if you can't figure it out.

    Please Read Me

    Comment


      #3
      Okay - found directions for RHEL and Centos, but they have things setup differently than (K)Ubuntu - at least they have GUI tools not available under (K)Ubuntu.

      Also, it is confusing about the fsid. I get that you use fsid=0 for one root directory, but what it you have 2 root directories. E.g.,

      /home

      and

      /dos

      that is I want to export the directories

      /home/backup-1
      /home/backup-2
      /home/terry

      and

      /dos/FAT32

      That gives me 2 root directories. Do I use fsid=0 for both That doesn't make sense to me. Or do I just export '/' using fsid=0 for the that directory, which essentially makes the whole directory tree exported.

      Doesn't make sense to me.

      Comment


        #4
        Here's my exports:

        /media/shared 192.168.1.0/24(rw,fsid=0,no_subtree_check,async,secure,nohide, all_squash,anonuid=1000,anongid=560)
        /media/shared/Videos 192.168.1.0/24(rw,no_subtree_check,async,secure,nohide,all_squ ash,anonuid=1000,anongid=560)
        /backups 192.168.1.0/24(rw,no_subtree_check,async,secure,nohide,all_squ ash,anonuid=1000,anongid=34)



        and here's how I mount them:

        server://media/shared /shared nfs bg,soft,users,rsize=32768,wsize=32768,noatime 0 0
        server://backups /backups/server nfs bg,soft,users,rsize=32768,wsize=32768,noatime 0 0


        So you should be able to export /home as a fsid=0 export, and then add /home/backup-1, etc., below it. Then export /dos/FAT32 separately. You only need two mounts, one for /home and one for /dos/FAT32.

        As far as the rpcinfo error, sounds like your hosts.allow isn't properly defined. You might check that before you pull any more hair.

        Please Read Me

        Comment


          #5
          BTW: my /proc/blah/exports isn't complete either.

          Please Read Me

          Comment


            #6
            here's my /etc/hosts.allow


            rpcbindd: 192.168.0.3
            lockd: 192.168.0.3
            rquotad: 192.168.0.3
            mountd: 192.168.0.3
            statd: 192.168.0.3
            nfsd: 192.168.0.3

            Following your advice on exporting /home with fsid=0 and /dos/FAT32 separately baffles me. What is the purpose of the fsid=0 if it isn't needed for a separate export of the /dos/FAT32?

            Comment


              #7
              FYI: My research shows it's

              rpcbind:

              not

              rpcbindd:

              worth trying anyway...

              Please Read Me

              Comment


                #8
                first my desktop /etc/exports: (NOTE: 192.168.0.2 is my desktop IP and 192.168.0.3 is my laptop IP)
                / 192.168.0.3(fsid=0,rw,sync,no_subtree_check)

                now my desktop /etc/fstab:
                192.168.0.3:/home/terry /home/Acer/terry nfs4 rw,hard,noexec,users,auto 0 0
                192.168.0.3:/usr/local/bin /home/Acer/usr/local/bin nfs4 rw,hard,noexec,users,auto 0 0
                192.168.0.3:/usr/local/share/QTAwk /home/Acer/usr/local/share/QTAwk nfs4 rw,hard,noexec,users,auto 0 0

                and my laptop etc/exports:
                / 192.168.0.2fsid=0,rw,sync,no_subtree_check)

                and my laptop /etc/fstab:
                192.168.0.2:/home/terry /home/desktop/terry nfs4 rw,hard,noexec,users,auto 0 0
                192.168.0.2:/home/backup-1 /home/desktop/backup-1 nfs4 rw,hard,noexec,users,auto 0 0
                192.168.0.2:/home/backup-2 /home/desktop/backup-2 nfs4 rw,hard,noexec,users,auto 0 0
                192.168.0.2:/dos/FAT32 /home/desktop/dos/FAT32 nfs4 rw,hard,noexec,users,auto 0 0

                when I try to open the files on my desktop I get the following:

                for

                /home/Acer/usr/local/bin

                I get the directory

                /usr/local/bin

                on the desktop!!!!!!!!!!!!!!!!

                That is instead of mapping the laptop directory to that mount point, nfs version 4 has simply mapped my desktop directory of the same name to the mount point.

                The same thing happens for the "192.168.0.3:/usr/local/share/QTAwk /home/Acer/usr/local/share/QTAwk", nfs version 4 has simply mapped the desktop file of the same anme to the mount point instead of the laptop file as specified in fstab.

                When I try to open "192.168.0.3:/home/terry /home/Acer/terry", I get the error message that the server has decided that the file does not exist.

                This is really strange behavior.

                Does anyubody really understand how nfs vers 4 works and how it is supposed to work?

                The internet docs I have found are mostly for Red Hat/Centos and the tools there are not available on (K)Ubuntu. There is one Ubuntu doc which is outstanding for it's brevity and confusion. It lightly skips over the central part that idmapd plays and assumes it is installed which is not true. It is NOT installed when nfs is installed which passing strange since nfs vers 4 will not work without it.

                I tried reverting to my files from 12.xx and specifying nfsvers=3 as an option for the fstab entries, saddly that DID NOT work.

                My last ditch effort is to reinstall 12.10 on both the desktop and laptop and wait for nfs version 4 to mature to the point it works and the documentation is available.

                Comment


                  #9
                  Thanks for the effort, but reread my post please.

                  Originally posted by oshunluvr View Post
                  FYI: My research shows it's

                  rpcbind:

                  not

                  rpcbindd:

                  worth trying anyway...

                  Comment


                    #10
                    I'm running 13.04 on both my laptops, and I share my HP laptop with my Toshiba laptop using nfs. On the Toshiba, the entry in its fstab file that accomplishes this is:

                    xxx.xxx.xx.xxx:/home/paul /home/paul/shared nfs rw,hard,intr,noexec 0 0

                    The x's are my HP IP address.
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      On both computers run this command and post results:

                      showmount -e
                      <IP_OF_OTHER_COMPUTER>

                      Please Read Me

                      Comment


                        #12
                        Originally posted by geezer View Post
                        Thanks for the effort, but reread my post please.
                        I don't know what you mean by the above.

                        NFSv4 is mature and works fine. Insisting it isn't doesn't help anything. You simply don't have your exports set up correctly. If you want help, I'll try and help. If you don't, that's fine too.

                        Please Read Me

                        Comment


                          #13
                          do you have idmapd running?

                          Comment


                            #14
                            On the desktop I get:
                            sudo showmount -e 192.168.0.2
                            [sudo] password for terry:
                            clnt_create: RPC: Port mapper failure - Authentication error
                            terry@Home-Net:~$ sudo showmount -e Cash_net
                            clnt_create: RPC: Unknown host

                            for the laptop I get:
                            sudo showmount -e Home-Net
                            clnt_create: RPC: Unknown host

                            The router clearly shows both with their respective IPs

                            Comment


                              #15
                              Well this:

                              clnt_create: RPC: Unknown host

                              usually means your hosts file isn't configured properly, but that shouldn't stop mounting shares if you use the IP. Yes, idmapd is running on both machines here using only the default options.

                              On my machines, only my server is running nfsserver so showmount only works when pointed to the server. When pointed to my client, it errors with:

                              clnt_create: RPC: Program not registered

                              Any chance you're running selinux or a firewall?

                              Based on what I see in your post #8 - if I'm reading it right it likes like you've got your exports and mounts backwords. Based on the NFSv4 manpages to export properly you should:

                              1. Bind mount desired exports to a target location.
                              2. Export the target as fsid=0
                              3. Mount the export on the client.

                              So for your desktop exports, you could do it this way:

                              create the target mounts:
                              mkdir /exports/
                              mkdir /exports/terry
                              mkdir /exports/backup1
                              mkdir /exports/backup2

                              in fstab:
                              /home/terry /exports/terry none bind
                              /home/backup1 /exports/backup1 none bind
                              /home/backup2 /exports/backup2 none bind

                              in exports:
                              /exports 192.168.0.3(rw,fsid=0,nohide,insecure,no_subtree_c heck,sync)
                              /exports/terry 192.168.0.3(rw,nohide,insecure,no_subtree_check,sy nc)
                              /exports/backup1 192.168.0.3(rw,nohide,insecure,no_subtree_check,sy nc)
                              /exports/backup2 192.168.0.3(rw,nohide,insecure,no_subtree_check,sy nc)

                              Then to mount on the laptop, fstab:
                              192.168.0.2:/ /home/desktop nfs4 _netdev,auto 0 0

                              or

                              192.168.0.2:/terry /home/desktop/terry nfs _netdev,auto 0 0
                              192.168.0.2:/backup1 /home/desktop/backup1 nfs _netdev,auto 0 0
                              192.168.0.2:/backup2 /home/desktop/backup2 nfs _netdev,auto 0 0


                              In theory, this is how it's done. Repeat for each other mount. You can still use NFSv3 by mounting with type "nfs" instead of nfs4. The advantage is you can mount groups of exports to a single location or default to old school and explicitly mount individual exports or both.
                              Last edited by oshunluvr; May 12, 2013, 09:25 PM.

                              Please Read Me

                              Comment

                              Working...
                              X