LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-26-2004, 10:29 AM   #1
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
FreeBSD NFS Exports can't be mounted


I am trying to export my FreeBSD home directories so that I can use them with the NIS setup I have (if there is a better/easier way please guide me to it ).

I have the following /etc/exports file on my freebsd machine:
Code:
/usr/home 192.168.7.10
Showmount on the client (Fedora Core 2) gives this:
Code:
# /usr/sbin/showmount -e 192.168.7.3
Export list for 192.168.7.3:
/usr/home 192.168.7.10
However when I try and mount it:
Code:
# mount 192.168.7.3:/usr/home /home
mount to NFS server '192.168.7.3' failed.
Why is it failing? Is it a client side issue or a sever side issue. It looks client side to me, but I just want to make sure.

Thanks in advance,
 
Old 08-26-2004, 03:35 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
http://www.freebsd.org/doc/en_US.ISO...html#NFS-LINUX

Have you tried the advice in the FAQ?
 
Old 08-26-2004, 07:59 PM   #3
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
In Fedora Core 2:
Code:
#mount -o -P 192.168.7.3:/usr/home /home
Unsupported nfs mount option: -P
Where do we go from here. I set up the NFS shares as the FreeBSD handbook says:
http://www.freebsd.org/doc/en_US.ISO...twork-nfs.html

Thanks,
 
Old 08-27-2004, 05:45 AM   #4
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
Please check the /etc/hosts.allow on your FreeBSD machine. .... That was a issue with me last time

I am assuming that 192.168.7.10 is the IP of your Fedora Core 2 Machine

... Nitin Batta ...

I Blog at : nitinb.blogspot.com
 
Old 08-27-2004, 07:05 AM   #5
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
Hi,

The bit I think that applies to NFS is now:
Code:
# Rpcbind is used for all RPC services; protect your NFS!
# (IP addresses rather than hostnames *MUST* be used here)
rpcbind : 192.168.7.10/255.255.255.0 : allow
#rpcbind : 192.0.2.96/255.255.255.224 : allow
rpcbind : ALL : deny
It also struck me to run the mount command 'verbose'., and i got this:
Code:
# mount -v 192.168.7.3:/usr/home/frenchidyll /home/frenchidyll
mount: no type was given - I'll assume nfs because of the colon
mount to NFS server '192.168.7.3' failed.
RPC Error: 15 ( Program not registered )
Hope that helps... You assume right about the IP of my FC2 machine
 
Old 08-27-2004, 01:33 PM   #6
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
Hey Dude

Try making the /etc/exports file as below

/usr/home -alldirs -network=192.168.7.0 -mask=255.255.255.0

Please modify the entry below in the /etc/hosts.allow

rpcbind : 192.168.7.0/255.255.255.0 : allow

Or you can also make it as

ALL : 192.168.7.0/255.255.255.0 : allow

to make it more generic.

Now finally kill your nfsd and restart so that it can read the changes made

nfsd -n 4

Hope this helps dude

.... Nitin ....
 
Old 08-27-2004, 05:21 PM   #7
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
Hi,

I have done what you said but I am still getting the same error as I outlined above. Any further ideas?
 
Old 08-28-2004, 03:48 AM   #8
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
Angry

I am totally stumpped as to how this is not working .... Well i don't have a FC2 machine to try and replicate the issue.

Will try to get a FC2 installation and see if i can replicate the same issue.

BTW can you do an NFS mount on another FreeBSD machine ,if you able to mount it successfully then this would rule out the possibility of wrong configuration on NFS server (192.168.7.3).

... Nitin Batta ...

I Blog at : http://nitinb.blogspot.com
 
Old 08-28-2004, 06:28 AM   #9
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
Hi,

I just thought I would find out what version of NFS I am running, and did this:

Code:
$rpcinfo -s
   program version(s) netid(s)                            service      owner
    100000  2,3,4        local,udp6,tcp6,udp,tcp    rpcbind     superuser
    100004  2,1           tcp,udp                             ypserv      unknown
    100005  3,1           tcp6,udp6,tcp,udp            mountd     unknown
I am suspicious that there is not nfsd or anything running there... Is this correct? or is nfsd not running :s
 
Old 08-28-2004, 06:59 AM   #10
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Hmm, it looks like it might not be running (talk about obvious first question we skipped).

Do you have it configured to start in /etc/rc.conf

We can add that in a in a second but first let's see if it will work.

# nfsd -n 4

That should start the daemon... check to see if it is running afterwards. If it is not we need to check the logs to see if/why it is failing.

nfsd has a history (with me at least) of silently failing to work.
 
Old 08-28-2004, 07:03 AM   #11
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
Yups looks like the nfsd is not running on the FreeBSD machine.

Just go to the FreeBsd machine and try to run

ps waux |grep nfsd

and check does it show any nfs process running and if yes how many instances does it show.

the way to start it is become "root"

and

#nfsd -u -t -n 4

and another command u can run to check is it from the FreeBSD machine pls run the following command

#rpcinfo -p localhost

... Nitin Batta ...

I Blog at : http://nitinb.blogspot.com
 
Old 08-28-2004, 09:47 AM   #12
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
YAY! Success... it turns out that it was running, but it wasnt... rather confusingly.

`ps waux | grep nfsd` - showed 4 processes called nfsd, 1 master and 3 servers. But `rpcinfo -p localhost`didn't show any signs of nfs, so I ran `nfsd -u -t -n 4` which through a binding error about address *:udp.

So I decided to kill the existing nfsd processes and start nfsd up again, and wahlah! Four `kill -9`'s later and a nfsd start I was able to finally mount my NFS!

Thanks again for all your help! We got there in the end. Never discount the simple things

Thanks,
 
Old 08-28-2004, 12:58 PM   #13
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
ok Kool Finally the issue lies closed.


.... Nitin Batta ....

I Blog at : http://nitinb.blogspot.com
 
Old 06-25-2008, 06:34 PM   #14
rcase5
Member
 
Registered: Apr 2004
Distribution: Fedora & Debian
Posts: 38

Rep: Reputation: 15
Wink nfs mount daemon caught napping?

I just ran into this exact problem myself.

My situation was that I had one server, and I had two other systems (also servers) connecting to a volume on the one server. One system had the volume mounted (at least 2 months), and it was working perfectly. I just brought up the second system and was trying to connect to the same volume, and it wasn't letting me in (same problem reported above).

I did a "ps -ef | grep nfs" and they listed the processes, but they had square brackets around them, indicating zombie processes. So I restarted the daemon on the server "/etc/init.d/nfs restart", and all the sudden I was able to mount on the second system.

Also, for those who are wary of trying this with an existing mount, it didn't disrupt the first system's mount; it still appears to be working perfectly.

I don't pretend to be an expert on NFS, but this sounds like a bug to me. I mean, I expect that the NFS daemon will accept new connections no matter how long it's been since the last request. Can anybody tell us whether this is the way the NFS daemon is supposed to behave?

Incidentally, my configurations are:

Server: AMD Opteron 1218HE (2.6GHz)
4GB RAM
Supermicro H8SMi-2-O Motherboard
1 160GB Seagate Barracuda SATA Drive
2 750GB Seagate Barracuda SATA Drives (in mirrored RAID)

The first client system is identical to the above.

Second Client: AMD Opteron 1218HE (2.6GHz)
2GB RAM
Supermicro H8SSLi-2 Motherboard
1 160GB Seagate Barracuda SATA Drive

All three systems are running Fedora 8.

Robert...
 
  


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 and exports file DanielTan Linux - Networking 12 07-31-2005 11:32 AM
NFS: a mounted to b, b mounted to c, c can't read a? Steve Cronje Linux - Networking 9 10-25-2004 09:51 AM
How many NFS partitions can be mounted? ksingh Linux - Software 1 09-10-2004 03:29 AM
NFS Root Boot - Exports soulkeeper Linux - Networking 3 07-24-2004 02:27 AM
Mounted NFS permissions dlsw Linux - Networking 2 03-22-2001 12:46 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:45 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