LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2012, 01:52 AM   #1
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Rep: Reputation: 32
Exclamation Need Autofs fix for RHEL6.3|Centos6.3 urgent


Alright guys, I am starting new thread here to get the solution for the issue I am having. I am giving my RHCSA exam on Sept 21st, and I am preparing myself alot.

I am stuck at one issue I have been facing every since I started working with autofs. The issue is that it doesnt mount the nfs mount_point when I do "cd /share/nfs"

Here is the scenario: I have one server and two linux clients.

Server
1. I have NFS server running on CentOS6.3 machine.
Configuration:

[root@centos6 /]# cat /etc/exports
/var/ftp/pub *(rw,sync)
/nfs *(rw,sync)



[root@centos6 /]# rpm -qa rpcbind
rpcbind-0.2.0-9.el6.x86_64

[root@centos6 /]# rpm -qa nfs-utils
nfs-utils-1.2.3-26.el6.x86_64


[root@centos6 /]# service nfs restart
Shutting down NFS daemon: [ Working ]
Shutting down NFS mountd: [ Working ]
Shutting down NFS quotas: [ Working ]
Shutting down NFS services: [ Working ]
Starting NFS services: [ Working ]
Starting NFS quotas: [ Working ]
Starting NFS mountd: [ Working ]
Stopping RPC idmapd: [ Working ]
Starting RPC idmapd: [ Working ]
Starting NFS daemon: [ Working ]
[root@centos6 /]#

2. client 1 is running rhel6.3
Configuration:
[root@rhel6 ~]# grep -v ^# /etc/auto.master
/misc /etc/auto.misc
/net -hosts
+auto.master
/share /etc/auto.share

[root@rhel6 ~]# grep -v ^# /etc/auto.share
nfs -fstype=nfs,rw 172.16.1.23:/nfs

This is the configurations I have guys, but when I try to do "cd /share/nfs" it will show no such directory found.

[root@rhel6 ~]# cd /share/nfs
-bash: cd: /share/nfs: No such file or directory
[root@rhel6 ~]#

3. Client 2. This one is running rhel6.1. On this one it works fine.
[root@rhel6 ~]# cd /shares/nfs
[root@rhel6 nfs]# pwd
/shares/nfs
[root@rhel6 nfs]# ls
123 456



What could go wrong? both have same configuration and I seriously need a solution. I have reinstalled and check selinux and all that things more then 10 times and it is still having same issue. I tried SL6.3, RHEL6.3, CentOS6.3 all were not successful.

I hope someone can help me to fix the issue by the morning. Been trying to fix this issue for past two days.

Thanks,

Ray
 
Old 09-19-2012, 04:44 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
I don't see you starting autofs anywhere.
Note that you also need to make permanent changes if doing the RHCSA exam.

What is you network configuration of both the server and the client?

Is you firewall enabled? I would try stopping it first.
NFS uses dynamic ports so you might have to configure them in /etc/sysconfig/nfs iirc.
Then you need to open the firewall appropriately.
So first check with the firewall disabled on both machines.
Also check with tcpdump if you actually get nfs packets on the server.
 
1 members found this post helpful.
Old 09-19-2012, 01:24 PM   #3
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by deadeyes View Post
I don't see you starting autofs anywhere.
Note that you also need to make permanent changes if doing the RHCSA exam.

What is you network configuration of both the server and the client?

Is you firewall enabled? I would try stopping it first.
NFS uses dynamic ports so you might have to configure them in /etc/sysconfig/nfs iirc.
Then you need to open the firewall appropriately.
So first check with the firewall disabled on both machines.
Also check with tcpdump if you actually get nfs packets on the server.
yes, I did start the service. Otherwise it wouldn't have worked on rhel6.1
 
Old 09-19-2012, 03:10 PM   #4
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
As you said to open ports from nfs file and I did. I also enabled them from the firewall.

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth+ -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5905 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 32803 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 32769 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 662 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 662 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p icmp -j ACCEPT
-A FORWARD -i lo -j ACCEPT
-A FORWARD -i eth+ -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
RPCNFSDARGS="-N 2 -N 3"
MOUNTD_PORT=892
STATD_PORT=662
STATD_OUTGOING_PORT=2020
 
Old 09-19-2012, 03:11 PM   #5
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rahilmaknojia View Post
As you said to open ports from nfs file and I did. I also enabled them from the firewall.

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth+ -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5905 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 32803 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 32769 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 662 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 662 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p icmp -j ACCEPT
-A FORWARD -i lo -j ACCEPT
-A FORWARD -i eth+ -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
RPCNFSDARGS="-N 2 -N 3"
MOUNTD_PORT=892
STATD_PORT=662
STATD_OUTGOING_PORT=2020
But it still doesn't work.

Here are the ports open from nfs server:

[root@centos6 rahil]# nmap localhost

Starting Nmap 5.51 ( http://nmap.org ) at 2012-09-19 14:11 CDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000012s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 986 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
443/tcp open https
445/tcp open microsoft-ds
631/tcp open ipp
2049/tcp open nfs
5900/tcp open vnc
5901/tcp open vnc-1
5902/tcp open vnc-2
6002/tcp open X11:2

Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
 
Old 09-19-2012, 05:02 PM   #6
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Anyways, I fixed the issue. In iptables I had to allow port tcp 111 rpcbind. After allowing the port no. 111 it worked great!
 
1 members found this post helpful.
Old 09-19-2012, 05:04 PM   #7
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
I hope in RHCSA exam they have NFS server running with port no. 111 allowed in iptables. If not then I am screwed!
 
Old 09-19-2012, 06:05 PM   #8
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 12.04/14.04, Scientific Linux 6.3/6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,791

Rep: Reputation: 157Reputation: 157
I was under the impression that you had full admin rights on the RHCSA/RHCE exams...
 
Old 09-19-2012, 11:51 PM   #9
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
I hope so, because I never gave any Red Hat exam.
 
Old 09-20-2012, 09:26 AM   #10
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
You have full permission on the machine you are configuring (not on remote machines).

Note that 111 is the default port.
Seems the firewall was the culprit after all
 
Old 09-26-2012, 02:12 PM   #11
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Anyways, pass my exam
 
  


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
autofs hangs, CentOS6.2 kaszask Linux - Networking 5 08-17-2012 09:00 AM
How to upgrade kernel in rhel6/centos6 with internet. manually download and upgrade. Gil@LQ Linux - Kernel 3 03-12-2012 06:07 PM
unable to install rhel6/centos6 in GUI mode in KVM Gil@LQ Linux - Virtualization and Cloud 5 12-01-2011 06:22 AM
nvidia Noobs with fedora 12 13 14 15 rhel6 sl6 centos6 dfowensby Fedora 2 08-01-2011 01:44 AM
nvidia Noobs with fedora 12 13 14 15 rhel6 sl6 centos6 dfowensby Fedora 0 07-31-2011 09:06 PM


All times are GMT -5. The time now is 03:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration