LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-19-2008, 01:32 PM   #1
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
NFS server setup: what's wrong?


Hello everybody!

I've got two linux boxes: 192.168.1.2(unicorn) and 192.168.1.4(zeta)
It's ok trying to mount zeta's folder to unicorn, but not the opposite.

Code:
[root@zeta]# mount 192.168.1.2:/home test
mount.nfs: mount to NFS server '192.168.1.2:/home/' failed: RPC Error: Program not registered
On unicorn log says:
Code:
[root@unicorn ~]# tail /var/log/messages.log
Aug 19 20:57:32 unicorn portmap[5575]: connect from 192.168.1.4 to getport(mountd): request from unauthorized host
Aug 19 20:57:32 unicorn portmap[5577]: connect from 192.168.1.4 to getport(nfs): request from unauthorized host
I've checked /etc/hosts.* on unicorn
Code:
[root@unicorn ~]# cat /etc/hosts.deny 
#
# /etc/hosts.deny
#

ALL: ALL: DENY

# End of file
[root@unicorn ~]# cat /etc/hosts.allow 
#
# /etc/hosts.allow
#

portmap         192.168.1.4

lockd           192.168.1.4
rquotad         192.168.1.4
mountd          192.168.1.4
statd           192.168.1.4

# End of file
unicorn's rpcinfo from unicorn:
Code:
[root@unicorn ~]# rpcinfo -p localhost
   program vers proto   port
    100000    2   tcp    111  portmapper
    100005    1   udp  42835  mountd
    100005    1   tcp  41889  mountd
    100005    2   udp  42835  mountd
    100005    2   tcp  41889  mountd
    100005    3   udp  42835  mountd
    100005    3   tcp  41889  mountd
    100024    1   udp  53488  status
    100024    1   tcp  49869  status
    100021    1   udp  45922  nlockmgr
    100021    3   udp  45922  nlockmgr
    100021    4   udp  45922  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100021    1   tcp  41953  nlockmgr
    100021    3   tcp  41953  nlockmgr
    100021    4   tcp  41953  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
unicorn's rpcinfo from zeta:
Code:
[root@zeta]# rpcinfo -p 192.168.1.2
No remote programs registered.
does anyone knows what can cause such a strange behaviour?
 
Old 08-19-2008, 01:53 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,121

Rep: Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451Reputation: 6451
Quote:
Originally Posted by purplefish View Post
Hello everybody!

I've got two linux boxes: 192.168.1.2(unicorn) and 192.168.1.4(zeta)
It's ok trying to mount zeta's folder to unicorn, but not the opposite.

does anyone knows what can cause such a strange behaviour?
Do you have NFS server running on unicorn? How about your exports file, does it actually export a folder out to anyone?
 
Old 08-19-2008, 01:55 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
What do your /etc/exports files on each display?
 
Old 08-19-2008, 02:19 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Quote:
I've got two linux boxes: 192.168.1.2(unicorn) and 192.168.1.4(zeta)
It's ok trying to mount zeta's folder to unicorn, but not the opposite.
you want to mount zeta's (192.168.1.4) folder. but in command u r trying to mount 192.168.1.2 (unicorn;s)
folder.

Code:
[root@zeta]# mount 192.168.1.2:/home test
here is the excerpts from Man page of mount command

The standard form of the mount command, is
mount -t type device dir
This tells the kernel to attach the file system found on device (which is of type
type) at the directory dir.

hopefully it will help
 
Old 08-19-2008, 02:20 PM   #5
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I've started services manually on unicorn:
Code:
[root@unicorn ~]# portmap
[root@unicorn ~]# rpc.mountd
[root@unicorn ~]# rpc.nfsd 
[root@unicorn ~]# rpc.statd  
[root@unicorn ~]# exportfs -ra
exportfs: No options for /home 192.168.1.0/255.255.255.0: suggest 192.168.1.0/25
5.255.255.0(sync) to avoid warning
exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specif
ied for export "192.168.1.0/255.255.255.0:/home".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: No options for /home rw: suggest rw(sync) to avoid warning
exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specif
ied for export "rw:/home".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: rw has non-inet addr
exportfs: rw has non-inet addr
exportfs: No options for /mnt/bigass 192.168.1.0/255.255.255.0: suggest 192.168.
1.0/255.255.255.0(sync) to avoid warning
exportfs: /etc/exports [4]: Neither 'subtree_check' or 'no_subtree_check' specif
ied for export "192.168.1.0/255.255.255.0:/mnt/bigass".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: No options for /mnt/bigass rw: suggest rw(sync) to avoid warning
exportfs: /etc/exports [4]: Neither 'subtree_check' or 'no_subtree_check' specif
ied for export "rw:/mnt/bigass".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: rw has non-inet addr
exportfs: rw has non-inet addr
"exportfs: rw has non-inet addr" message is a bit strange as for me. i've not encountered it on zeta, where server works fine.

My /etc/exports on both machines:
Code:
[root@unicorn ~]# cat /etc/exports 
# /etc/exports
#
# See exports(5) for a description.

# use exportfs -arv to reread
#/export    192.168.1.10(rw,no_root_squash)

/home           192.168.1.0/255.255.255.0 rw
/mnt/bigass     192.168.1.0/255.255.255.0 rw
Code:
[root@zeta] cat /etc/exports
/home           192.168.1.0/255.255.255.0(rw)
/usr/bigass 192.168.1.0/255.255.255.0(rw)
/usr/src        192.168.1.0/255.255.255.0(ro)
Thanks for reply)))
 
Old 08-19-2008, 02:25 PM   #6
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by varindersingh View Post
you want to mount zeta's (192.168.1.4) folder. but in command u r trying to mount 192.168.1.2 (unicorn;s)
folder.

Code:
[root@zeta]# mount 192.168.1.2:/home test
here is the excerpts from Man page of mount command

The standard form of the mount command, is
mount -t type device dir
This tells the kernel to attach the file system found on device (which is of type
type) at the directory dir.

hopefully it will help
mmm... well i've succeed to mount zeta's folder to unicorn. The problem is to mount unicorn's folder to zeta - when unicorn shall act as a server.
 
Old 08-19-2008, 02:30 PM   #7
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
ooh! I am so sorry.

By default the NFS is protected by SELinux. U can try by putiing the SELINUX in to permssive mode

Last edited by KinnowGrower; 08-19-2008 at 02:44 PM.
 
Old 08-19-2008, 03:27 PM   #8
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
i'm not very sure, but i think i don't have selinux there are no /selinux folder...
varindersingh, thank you anyway.
 
Old 08-19-2008, 03:45 PM   #9
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Oups! There were errors in my /etc/exports file
It should be
Code:
[root@unicorn ~]# cat /etc/exports
/home           192.168.1.0/255.255.255.0(rw,no_subtree_check,no_root_squash)
/mnt/bigass     192.168.1.0/255.255.255.0(rw,no_subtree_check,no_root_squash)
Now all daemons start up quietly. but! now, if i try from unicorn:
Code:
[root@unicorn ~]# showmount -e localhost
rpc mount export: RPC: Program/version mismatch; low version = 3, high version = 3[root@unicorn ~]#
[root@unicorn ~]# showmount -e 192.168.1.2
portmap getport: RPC: Success
i dont even sure if "showmount -e 192.168.1.2" gives an error message Anyway, it should have written unicorn's exports...
And of course i still cant mount unicorn's folders) So it got worse after rewriting /etc/exports in a right way
 
Old 08-20-2008, 10:15 AM   #10
purplefish
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Lightbulb

I've mistyped /etc/hosts.allow too. It lacks colon after service names.
Sorry for such a mess. It works great now!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setup NFS server to install OS to clients. hocheetiong Linux - Newbie 1 08-26-2007 10:05 PM
NFS setup question: No password setup? ksgill Linux - General 4 12-04-2005 11:50 AM
Firewall setup for NFS server, Suse 9.1 deh6 Linux - Networking 1 08-25-2004 02:24 AM
help with client side NFS-firewall setup and server side NIS-firewall setup niverson Linux - Networking 3 02-02-2004 08:52 AM
What's wrong with that NFS!!! c0c0deuz Linux - Networking 12 11-06-2002 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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