FedoraForum.org - Fedora Support Forums and Community
Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FC19 - Enable NFSv2

    Hello,

    I have a fresh FC19 installation (MATE Desktop) where I try to enable NFSv2 to boot
    an embedded board.

    NFS is basically running, but only v3 and v4:

    $ 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 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 3 tcp 2049 nfs_acl
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100227 3 udp 2049 nfs_acl
    100021 1 udp 38559 nlockmgr
    100021 3 udp 38559 nlockmgr
    100021 4 udp 38559 nlockmgr
    100021 1 tcp 56237 nlockmgr
    100021 3 tcp 56237 nlockmgr
    100021 4 tcp 56237 nlockmgr
    100011 1 udp 875 rquotad
    100011 2 udp 875 rquotad
    100011 1 tcp 875 rquotad
    100011 2 tcp 875 rquotad
    100005 1 udp 20048 mountd
    100005 1 tcp 20048 mountd
    100005 2 udp 20048 mountd
    100005 2 tcp 20048 mountd
    100005 3 udp 20048 mountd
    100005 3 tcp 20048 mountd
    100024 1 udp 55122 status
    100024 1 tcp 39133 status

    How can I enable the protocol version 2?

    Best regards,

    Matthias

  2. #2
    stevea Guest

    Re: FC19 - Enable NFSv2

    Interesting - I get this ...

    100003 2 tcp 2049 nfs
    100003 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 2 tcp 2049 nfs_acl
    100227 3 tcp 2049 nfs_acl
    100003 2 udp 2049 nfs
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    What's in /etc/sysconfig/nfs ?

  3. #3
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    The /etc/sysconfig/nfs file contains

    #
    # Optinal options passed to rquotad
    RPCRQUOTADOPTS=""
    #
    # Optional arguments passed to in-kernel lockd
    #LOCKDARG=
    # TCP port rpc.lockd should listen on.
    #LOCKD_TCPPORT=32803
    # UDP port rpc.lockd should listen on.
    #LOCKD_UDPPORT=32769
    #
    # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
    RPCNFSDARGS=""
    # Number of nfs server processes to be started.
    # The default is 8.
    RPCNFSDCOUNT=8
    # Set V4 grace period in seconds
    #NFSD_V4_GRACE=90
    #
    # Optional arguments passed to rpc.mountd. See rpc.mountd(8)
    RPCMOUNTDOPTS=""
    #
    # Optional arguments passed to rpc.statd. See rpc.statd(8)
    STATDARG=""
    #
    # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
    RPCIDMAPDARGS=""
    #
    # Optional arguments passed to rpc.gssd. See rpc.gssd(8)
    RPCGSSDARGS=""
    # Enable usage of gssproxy. See gssproxy-mech(8).
    GSS_USE_PROXY="no"
    #
    # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
    RPCSVCGSSDARGS=""
    #
    # To enable RDMA support on the server by setting this to
    # the port the server should listen on
    #RDMA_PORT=20049
    #
    # Optional arguments passed to blkmapd. See blkmapd(8)
    BLKMAPDARGS=""
    To install / start NFS I did the following:

    $ yum -y install nfs-utils

    add a line to /etc/exports

    $ systemctl start rpcbind.service
    $ systemctl start nfs-server.service
    $ systemctl start nfs-lock.service
    $ systemctl start nfs-idmap.service

  4. #4
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    If I enable the services and reboot I get the following output:

    $ systemctl enable rpcbind.service
    $ systemctl enable nfs-server.service
    $ systemctl enable nfs-lock.service
    $ systemctl enable nfs-idmap.service

    $ 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 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 3 tcp 2049 nfs_acl
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100227 3 udp 2049 nfs_acl
    100021 1 udp 38559 nlockmgr
    100021 3 udp 38559 nlockmgr
    100021 4 udp 38559 nlockmgr
    100021 1 tcp 56237 nlockmgr
    100021 3 tcp 56237 nlockmgr
    100021 4 tcp 56237 nlockmgr
    But no NFSv2 ...

  5. #5
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,339
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    does rpcinfo -s show '2' as a version in the second column?

    Does it help to add the nfsvers=2 option in your /etc/fstab entry for that mount ? (see "man nfs" )

  6. #6
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Do you mean I should add on the server an entry in the fstab for the NFS export?
    I never did that in the past. (On e.g. Debian)

    Or do you mean on the client? The client is a arm linux kernel which mounts the root filesystem via NFS.
    (There is also no fstab entry. The parameters are given on the kernel commandline.)

    [I try to port/move my development Environment from Debian to Fedora.]

  7. #7
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Here is the output of rpcinfo -s

    $ rpcinfo -s
    program version(s) netid(s) service owner
    100000 2,3,4 local,udp,tcp,udp6,tcp6 portmapper superuser
    100003 4,3 udp6,tcp6,udp,tcp nfs superuser
    100227 3 udp6,tcp6,udp,tcp nfs_acl superuser
    100021 4,3,1 tcp6,udp6,tcp,udp nlockmgr superuser

  8. #8
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Has anyone an idea why NFSv2 is not started ?

  9. #9
    Join Date
    Oct 2013
    Location
    Mesa, AZ
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    My NFSv2 capable server was working until I updated to the latest updates today. I suspect an update along the way broke NFSv2 mounts, if I try:

    mount -o nolock,vers=2,tcp <ip>:/path /mnt

    I just get the following error:

    mount.nfs: Protocol not supported

    This was working yesterday, the only change was I updated the system.

    ---------- Post added at 01:05 AM ---------- Previous post was at 01:01 AM ----------

    It appears like the kernel package broke it:

    cat /proc/fs/nfsd/versions
    -2 +3 +4 +4.1 -4.2

    See this discussion on the kernel lists, it appears to be an upstream issue in nfs-utils

    https://lkml.org/lkml/2013/9/26/764


    Update: Work-around that works for me, from the above discussion:

    I've changed /etc/sysconfig/nfs file as following diff ;
    @@ -10,7 +10,7 @@
    #LOCKD_UDPPORT=32769
    #
    # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
    -RPCNFSDARGS=""
    +RPCNFSDARGS="-V 2"

    Then. run nfs server again...

    # systemctl restart nfs-server.service

    # cat /proc/fs/nfsd/versions
    +2 +3 +4 +4.1 -4.2

    Everything works after that. Sorry for spamming the post so quickly, but I seem to have found a solution Can others confirm then add solved if it works?
    Last edited by jimbo333; 2nd October 2013 at 02:14 AM. Reason: Update with solution.

  10. #10
    Join Date
    Oct 2010
    Location
    Gilbert, AZ
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    jimbo333,

    Thanks a bunch! Your solution saved my keester! I been trying to solve this for a week now, with now luck. But, I changed the /etc/sysconfig/nfs file as you described and did a reboot, now my clien development board can mount an FS over NFSv2 on my Fedora 19 box.

    Thanks again!

  11. #11
    Join Date
    Aug 2009
    Posts
    11,390
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Just FYI

    I believe that they are going to stop compiling the kernel with NFSv2 in Fedora 20. You can still compile the kernel yourself and build the modules, but as far as the plain Fedora kernel, it's going to support NFSv3 and NFSv4 only.

  12. #12
    Join Date
    Sep 2015
    Location
    UK
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Hi There,

    I try to setup an nfs server to boot a diskless single board computer.
    I ran into the exact issue described above using Fedora 22. rpcinfo -p show that only ver 3 and 4 of nfs are running.

    I try the fixed given here to add the -V 2 option to in the /etc/sysconfig/nfs file, but with no effect. I am not sure if this file is actually used any more, as putting any kind of arguments does not affect the restart of the nfs service (systemctl restart nfs).

    Following on this:
    I believe that they are going to stop compiling the kernel with NFSv2 in Fedora 20. You can still compile the kernel yourself and build the modules, but as far as the plain Fedora kernel, it's going to support NFSv3 and NFSv4 only.
    I search on the web about this and didn't found any other source mentioning this drop in the support of NFSv2. Is that true? Is there instruction on how to rebuild the nfs kernel module (that start to be out of my range of competence, so sorry if I use incorrect wording).

    Thanks for your help!

  13. #13
    Join Date
    Sep 2015
    Location
    UK
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FC19 - Enable NFSv2

    Hi leonpollak

    I started again this morning is a fresher mind and the assurance it could work! I found the issue. The problem was how I restarted the nfs service on the server after editing the /etc/sysconfig/nfs file.

    On FC22 you need to restart nfs with:
    # systemctl restart nfs-config (<- that one actually indicated in etc/sysconfig/nfs, just have to read... )
    # systemctl restart nfs
    # systemctl restart rpcbind

    Once you do that, you got
    # cat /proc/fs/nfsd/versions
    +2 +3 +4 +4.1 -4.2

    The embedded system now mount the NFS partition correctly (but end up in yet another form of kernel panic).

    Thanks a lot for your help!

Similar Threads

  1. FC19 Dell OpenManage
    By robert.forster in forum Servers & Networking
    Replies: 4
    Last Post: 30th October 2013, 09:01 PM
  2. Replies: 30
    Last Post: 8th September 2013, 07:20 PM
  3. FedUP Fc19
    By Mayagrafix in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 2nd August 2013, 06:12 PM
  4. Replies: 5
    Last Post: 29th July 2013, 01:01 PM
  5. Getting eth0 back under fc19?
    By PhilipS in forum F19 Development
    Replies: 4
    Last Post: 15th June 2013, 03:25 AM

Tags for this Thread

Posting Permissions

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