LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-14-2005, 04:54 PM   #1
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Rep: Reputation: 30
FC3: NFS Server and Startup Scripts


Hello, folks.

I have been following this NFS Server How-To, and I have run into problem. I am not sure how to set up the startup scripts such that all the correct daemons are running as shown here:

Quote:
3.3.3. The Daemons

NFS serving is taken care of by five daemons: rpc.nfsd, which does most of the work; rpc.lockd and rpc.statd, which handle file locking; rpc.mountd, which handles the initial mount requests, and rpc.rquotad, which handles user file quotas on exported volumes. Starting with 2.2.18, lockd is called by nfsd upon demand, so you do not need to worry about starting it yourself. statd will need to be started separately. Most recent Linux distributions will have startup scripts for these daemons.

The daemons are all part of the nfs-utils package, and may be either in the /sbin directory or the /usr/sbin directory.

If your distribution does not include them in the startup scripts, then then you should add them, configured to start in the following order:

rpc.portmap
rpc.mountd, rpc.nfsd
rpc.statd, rpc.lockd (if necessary), and rpc.rquotad
Do anyone have some suggests or a startup script FAQ that they an point me to?
 
Old 03-15-2005, 10:01 AM   #2
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
chkconfig portmap on
chkconfig nfs on

service portmap restart
service nfs restart

The top two switch on the deamons in runlevel 3 and 5.
The next two restart(start) the deamons.
Is that what you mean?
 
Old 03-15-2005, 10:23 AM   #3
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Thank you for your response. I have those running via those same commands. My trouble is getting the others started as are listed here:

Quote:
If your distribution does not include them in the startup scripts, then then you should add them, configured to start in the following order:

rpc.portmap
rpc.mountd, rpc.nfsd
rpc.statd, rpc.lockd (if necessary), and rpc.rquotad
When I run the same commands with the above scripts, I receive an error to the effect of service not found. I do have the scripts: some are located in /sbin and others in /usr/sbin. Will I have to do a sym link from their current location to /etc/init.d (or wherever the scripts reside, I'm not at my linux machine) or can I use the chkconfig and service commands such that "chkconfig /sbin/rpc.portmap on."

Also, how does one order services? Just edit the conf file? This all is pretty new to me, so I don't want to tinker too much.
 
Old 03-15-2005, 11:28 AM   #4
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
To see if there are running, which they should be, type
rpcinfo -p localhost
 
Old 03-16-2005, 01:16 PM   #5
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Seems like its all running, but I keep getting the following error: "NFS Portmap: RPC: Port mapper failure - RPC: Timed out." The NFS Server is FC3, and the NFS client is Mac OS 10.3.8.

Edited to Add: I had one of the two NFS ports closed, so after opening them I got the following error: "mount_nfs: bad MNT RPC: RPC: Timed out."

Quote:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32770 status
100024 1 tcp 32768 status
100011 1 udp 922 rquotad
100011 2 udp 922 rquotad
100011 1 tcp 925 rquotad
100011 2 tcp 925 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 udp 32771 nlockmgr
100021 3 udp 32771 nlockmgr
100021 4 udp 32771 nlockmgr
100021 1 tcp 32769 nlockmgr
100021 3 tcp 32769 nlockmgr
100021 4 tcp 32769 nlockmgr
100005 1 udp 1004 mountd
100005 1 tcp 1007 mountd
100005 2 udp 1004 mountd
100005 2 tcp 1007 mountd
100005 3 udp 1004 mountd
100005 3 tcp 1007 mountd

Last edited by General_Tso; 03-16-2005 at 01:45 PM.
 
Old 03-17-2005, 03:42 AM   #6
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
To see what you have exported type

showmount -e localhost

You should see the lists of exports.

Now try showmount -e <ip address>

You should get the same as before if nfs is setup properly.

If the above is ok try to mount the nfs export.

mount -t nfs <your export> <mount point>
 
Old 03-17-2005, 12:28 PM   #7
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Hmmm. "showmount -e localhost" does not show any anything in the export list. What am I doing wrong?

Thanks!
 
Old 03-17-2005, 01:01 PM   #8
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
NFS
1) Edit the etc/exports file( here's mine)
/var/ftp/pub 192.168.1.0/24 192.168.2.0/24(ro,sync)
/mnt/music 192.168.1.0/24 192.168.2.0/24(ro,sync,no_root_squash)
/home 192.168.1.0/24 192.168.2.0/24(rw,sync)

2) save and quit
then run the command eportfs -rav
You should get a list of your exports.
3) now restart the service as stated above in an earlier post.

If that fails have you lokked in hosts.allow and hosts.deny?
Or try flushing your firewall iptables -F
 
Old 03-17-2005, 06:34 PM   #9
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Here's my /etc/exports:

Quote:
/home 192.168.1.1/255.255.255.0(rw,sync)
/var/ftp/pub 192.168.1.1/255.255.255.0(rw,sync)
Here's my /etc/hosts.allow:

Quote:
ssh: 192.168.1.1/255.255.255.0
vsftpd: 192.168.1.1/255.255.255.0
portmap: 192.168.1.1/255.255.255.0
lockd: 192.168.1.1/255.255.255.0
rquotad: 192.168.1.1/255.255.255.0
mountd: 192.168.1./255.255.255.0
statd: 192.168.1.1/255.255.255.0
Here's my /etc/hosts.deny:

Quote:
ssh:ALL
vsftpd:ALL
portmap:ALL
lockd:ALL
rquotad:ALL
mountd:ALL
statd:ALL
Well, something I did made the "showmount -e localhost" output appear.

Quote:
Export list for localhost:
/home 192.168.1.1/255.255.255.0
/var/ftp/pub 192.168.1.1/255.255.255.0
Here's what happen when I execute the command: sudo mount -t nfs 192.168.1.3:/home /Volumes

Quote:
NFS Portmap: RPC: Program not registered
Interestingly, when I execute "showmount -e 192.168.1.3" from my Powerbook, I get the following output:

Quote:
RPC: Program not registered: Can't do Exports rpc
Thanks for all the input so far!

Last edited by General_Tso; 03-17-2005 at 06:39 PM.
 
Old 03-18-2005, 05:15 AM   #10
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
Try adding the line

nfs: 192.168.1.1/255.255.255.0

to hosts.allow ,and change hosts.deny to only

ALL: ALL

Then restart the services and see what happens.
 
Old 03-18-2005, 05:21 AM   #11
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
Another thought, change all the etc hosts.allow to

<service>: 192.168.1. 127. EXCEPT <any exceptions here i.e 192.168.2. etc>

and hosts.deny to as I said

ALL: ALL

Try that
 
Old 03-18-2005, 01:27 PM   #12
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Still getting "NFS Portmap: RPC: Program not registered."
 
Old 03-18-2005, 04:17 PM   #13
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
I sugesst you comment out all the lines in hosts.allow and hosts.deny.
Then iptables -F followed by service iptables stop

Make sure that you can rpcinfo -p <nfs server> from another host on the network.
If thats ok try showmount - e <server name> from another host.
Then try the mount command from above.
 
Old 03-20-2005, 12:08 AM   #14
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Okay, I had a bit of breakthrough. With "ALL:ALL" commented in hosts.deny and everything as I listed before in hosts:allow, my NFS client worked! (To those of you trying to use your OS X machine as a host, you will have to add the "insecure" option to the directory you wish to share in your exports file as per this site.) On my NFS client, an app called nfs_mount seems to depend upon three ports: 672, 675, and 685. I'm not sure if this unique to OS X or common to all NFS clients, but I kept seeing it bounce off my firewall during my attempts to connect to the server.

Enter the "but." When I can connect to my /home directory, I do not have permission to access two of the three user directories. I'm worried my permissions are screwed up somehow--the inconsistency is what bugs me. Any thoughts?

Thanks for all the input, great info!

Last edited by General_Tso; 03-20-2005 at 12:10 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
Apache - default *.pl or *.cgi scripts on NFS share pdhami Linux - Enterprise 0 05-17-2004 11:34 AM
nfs-server startup irvken Linux - Networking 2 01-03-2004 12:00 PM
startup scripts amphion Linux - Newbie 8 03-28-2003 01:39 PM
startup scripts mimi Linux - Newbie 6 04-26-2002 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration