Operating System - Linux
1828345 Members
2979 Online
109976 Solutions
New Discussion

How do I turn on NFS Server on Linux ?

 
SOLVED
Go to solution
Stuart Abramson_2
Honored Contributor

How do I turn on NFS Server on Linux ?

I'm bumbling my way along on my first Linux machine.

I'm getting the following error on my HP-UX client:

# mount 172.20.209.22:/var/tomcat4/invoicingXML /tmp/dummy
nfs mount: get_fh: 172.20.209.22:: RPC: Program not registered
nfs mount: get_fh: 172.20.209.22:: RPC: Program not registered
nfs mount: retry: retrying(1) for: /tmp/dummy after 5 seconds
nfs mount: retry: giving up on: /tmp/dummy
you have mail in /var/mail/root

I take this to mean that RPC or NFS Server is not started on the Linux Server.

Here is what I'm running on Linux:

> ps -ef | grep rpc
rpc 582 1 0 Sep09 ? 00:00:00 [portmap]
rpcuser 610 1 0 Sep09 ? 00:00:00 [rpc.statd]
root 1088 1 0 Sep09 ? 00:00:00 rpc.rstatd
root 4681 4243 0 11:55 pts/3 00:00:00 grep rpc

How do I start this stuff on Linux?

On HP-UX I:
1. cd /etc/rc.config.d/
2. vi nfsconf
..........Set parameters the way I want them
3. /sbin/init.d/nfs.server start
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: How do I turn on NFS Server on Linux ?

On Linux

service nfs start

You will need an /etc/exports file

To restart

service nfs restart

or /etc/init.d/nfs start
/etc/init.d/nfs restart

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: How do I turn on NFS Server on Linux ?

To set up the service you may need to use this command:

chkconfig --level 345 nfs on

Most Linux installs already have that step done though.

Let me know how it turns out.

Regards,

Steven
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jerome Henry
Honored Contributor

Re: How do I turn on NFS Server on Linux ?

Hi,

Here is a small page on step by step setting up your server :
http://www.europe.redhat.com/documentation/rhl9/rhl-rg-en-9/s1-nfs-server-config.php3

hth

J
You can lean only on what resists you...
Umapathy S
Honored Contributor

Re: How do I turn on NFS Server on Linux ?

Stuart,
Generally the RPC: Program Not Registered denotes the portmapper is not working correctly. Either the portmapper is not restarted after the changes or it is not running at all.

Try,
service nfs stop; service nfs start;

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Bob_Vance
Esteemed Contributor

Re: How do I turn on NFS Server on Linux ?

Hi, Stuart.
You should note that the startup scenario is very similar to that under hpux.

'service' is simply a script that executes the familiar (to us hpux guys) startup script. The "init.d" directory can be in various places depending on the Linux distribution, e.g.,
... /etc/init.d
... /etc/rc.d/init.d

Umapathy is correct about 'portmapper', also:

Here is an example on my 6.2 RH system where NFS is not automatically started. herman, mandy, and winky are linux servers -- winky will be NFS server in this example (note that I have put periods at beginning of output) :

winky ## ll /init.d | sed 's/^/. /' | sed 's/ */ /g'
. lrwxrwxrwx 1 root root 12 Dec 6 2000 /init.d -> /sbin/init.d
winky ## ll /sbin/init.d | sed 's/^/. /' | sed 's/ */ /g'
. lrwxrwxrwx 1 root root 16 Oct 25 2000 /sbin/init.d -> /etc/rc.d/init.d
winky ## cat /etc/exports | sed 's/^/. /'
. /cdrom *(ro,no_root_squash)
. /var/tmp *(rw,no_root_squash)
winky ## exportfs -v # nothing exported yet :)
winky ## /init.d/portmap start
winky ## /init.d/nfs start
winky ## /init.d/nfslock start
winky ## exportfs -v |sed 's/^/. /'
. /mnt/cdrom *(ro,async,wdelay,no_root_squash)
. /var/tmp *(rw,async,wdelay,no_root_squash)
mandy-DEB ## rpcinfo -p winky | sed 's/^/. /'
. program vers proto port
. 100000 2 tcp 111 portmapper
. 100000 2 udp 111 portmapper
. 100011 1 udp 683 rquotad
. 100011 2 udp 683 rquotad
. 100005 1 udp 691 mountd
. 100005 1 tcp 693 mountd
. 100005 2 udp 696 mountd
. 100005 2 tcp 698 mountd
. 100003 2 udp 2049 nfs
. 100003 3 udp 2049 nfs
. 100021 1 udp 1026 nlockmgr
. 100021 3 udp 1026 nlockmgr
. 100024 1 udp 733 status
. 100024 1 tcp 735 status
linux1 ## mount -o ro,bg,intr,soft winky:/mnt/cdrom /mnt/cdrom
linux1 ## mount | grep winky | sed 's/^/. /'
. winky:/mnt/cdrom on /mnt/cdrom type nfs (ro,bg,intr,soft,addr=192.168.1.7)
linux1 ## ls -l /cdrom/ | sed 's/^/. /' | grep -v total | head -5
. -rw-r--r-- 8 root root 18385 Sep 7 1999 COPYING
. -rw-r--r-- 9 root root 3400 Mar 8 2000 README
. -rw-r--r-- 18 root root 16300 Mar 8 2000 RELEASE-NOTES
. -rw-r--r-- 8 root root 1908 Sep 25 1999 RPM-GPG-KEY
. drwxrwxr-x 5 root root 2048 Mar 8 2000 RedHat
linux1 ## umount /mnt/cdrom
linux1 ## ls -l /cdrom/ | sed 's/^/ /' | grep -v total


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Bob_Vance
Esteemed Contributor

Re: How do I turn on NFS Server on Linux ?

Ooops.
Too much apache for dinner.

The NFS unknown or anonymous user id isn't "nobody", but actually "-2" ( = 65534 16-bit ).


bv
"The lyf so short, the craft so long to lerne." - Chaucer