Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2001 02:50:59 -0400
From:      Jim Arnold <jim@ohio.com>
To:        freebsd-questions@freebsd.org
Subject:   nfs won't run from rc.conf
Message-ID:  <a05010402b77ad24cbe2f@[192.168.0.102]>

next in thread | raw e-mail | index | archive | help
I'm trying to get NFS to run at startup. I have gotten it to work by manually
restarting nfsd, portmap and mountd. I have followed the handbook but no dice.
searches turned up nothing that worked. below is the relevant information for
my setup.

spike# uname -a
FreeBSD spike.coyote 4.3-RELEASE FreeBSD 4.3-RELEASE #7: Sun Jul 15 
23:17:05 EDT 2001     jim@spike.coyote:/usr/src/sys/compile/SPIKE 
i386

when i boot the box i get to this point:

Starting final network daemons: mountd nfsd rpc.statd (when it gets to this
point in the boot process the machine waits 20 or so seconds before 
continuing on,
but then I get these messages below:

nfsd:[154]: can't register with udp portmap
mountd[152]: can't register mount

this appears to be correct:
spike# ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
         inet 127.0.0.1 netmask 0xff000000
         atalk 0.0 range 0-0 phase 2

My rc.conf settings for nfs:
spike# more /etc/rc.conf
network_interfaces="fxp0 lo0"
portmap_enable="YES"
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
mountd_flags="-r"
nfs_client_enable="YES"
nfs_client_flags="-n 4"

-------

when the system does start up portmap is *not* running, as a "ps aux 
| grep portmap"
returns nothing.

spike# ps aux | grep nfsd is running
root     156  0.0  0.1   352  172  ??  I     1:42AM   0:00.00 nfsd: 
server (nfsd)
root     157  0.0  0.1   352  172  ??  I     1:42AM   0:00.00 nfsd: 
server (nfsd)
root     158  0.0  0.1   352  172  ??  I     1:42AM   0:00.00 nfsd: 
server (nfsd)
root     159  0.0  0.1   352  172  ??  I     1:42AM   0:00.00 nfsd: 
server (nfsd)

mountd and rpc.statd are also not running on startup.

running rpcinfo -p returns:
rpcinfo: can't contact portmapper: RPC: Remote system error - 
Connection refused

next i run portmap and mountd manually and confirm that they are running:

spike# ps aux | grep portmap
daemon   371  0.0  0.2   924  512  ??  Ss    1:56AM   0:00.00 portmap

spike# ps aux | grep mountd
root     375  0.0  0.1   504  348  ??  Ss    1:57AM   0:00.00 mountd -r

now when i run rpcinfo -p i get the following:
    program vers proto   port
     100000    2   tcp    111  portmapper
     100000    2   udp    111  portmapper
     100005    3   udp   1015  mountd
     100005    3   tcp   1020  mountd
     100005    1   udp   1015  mountd
     100005    1   tcp   1020  mountd

after everything is running I try to mount from the another server 
and get this message:

angel# mount spike:/home /spike/home/
spike:/home: nfsd: RPCPROG_NFS: RPC: Program not registered

here is my /etc/exports file:
spike# more /etc/exports
/cdrom -ro angel 192.168.0.3
/home  -alldirs angel 192.168.0.3

angel# more /etc/hosts
127.0.0.1               localhost.coyote localhost
192.168.0.3             angel.coyote angel
192.168.0.3             angel.coyote.
192.168.0.2             spike

/etc/hosts.allow
ALL : localhost 127.0.0.1 : allow
portmap : 192.168.0.3/255.255.255.224 : allow

eventually by simply manually running
# portmap
# nfsd -u -t -n 4
# mountd -r
(in which order or which one does the trick i'm not certain) I can
get nfs to work on both boxes as a client or server.

when i finally got the one box to work as a server I got this
different output from rpcinfo -p  showing that nfs is working.

bash-2.05$ rpcinfo -p
    program vers proto   port
     100000    2   tcp    111  portmapper
     100000    2   udp    111  portmapper
     100024    1   udp   1009  status
     100024    1   tcp   1020  status
     100003    2   udp   2049  nfs
     100003    3   udp   2049  nfs
     100005    3   udp   1004  mountd
     100005    3   tcp   1019  mountd
     100005    1   udp   1004  mountd
     100005    1   tcp   1019  mountd

any clues to where i have gone astray in my setup?

tia,
jim













To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a05010402b77ad24cbe2f>