Mounting an NFS directory in /etc/fstab
Posted by DK907 on 2011/12/2 21:04:10
I am studying for the RHCSA exam and I am trying to mount an NFS directory at boot.
I resolved my ip address to david.example.com in /etc/hosts and I entered /shares *.example.com(rw,sync) in /etc/exports and entered exportfs -a. I entered
david.example.com:/shares /mnt/nfs nfs rsize=8192,wsize=8192,timeo=14,intr,udp 0 0
When I restart it takes longer than normal to boot up and when I check the boot messages it says mount.nfs connection timed out. When I enter mount -a it does mount /shares on /mnt/nfs.
I tried editing /etc/sysconfig/iptables and I added
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT
I did service iptables restart and it restarted without any problems but when I restart I still have the same problem.
Does anyone have any suggestions?.
[Moderator edited to insert code
tags to aid legibility.]
This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=56&topic_id=34540&post_id=148495