Skip to contentSkip to conversation

NFS service takes very long time to start when internet disconnected..

DISCUSSION Steven Shiau 2 participants 5 messages Jul 24, 2004 – Jul 26, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi...
My NFS server has two NICs, eth0 is public IP address, eth1 is private
IP. It's a NAT server, too.
The NFS service is for those clients with private IP address.
The server is running Fedora Core 1, with nfs-utils-1.0.6-1, and kernel
2.4.22-1.2193smp.
My problem is, when the server loses the Internet connection, i.e. the
eth0 can NOT connect to Internet, either it's caused when I move the machine to
different subnet while forgetting change the network setting, or the network cable is disconnected, the Fedore Core 1 takes very long time to boot. It just stops in "Starting NFS service..." for more than 17 minutes... So usually I reboot the machine, and enter the interactive mode to disable the NFS service when it boot.
My point is, is that possible I can make the NFS service startup very
quickly as usual when the eth0 Internet connection is NOT available ?

Thanks in advance.

Signature · 17 lines
Please AVOID distributing documents in WORD, EXCEL or POWERPOINT format.
[Chinese Big5] 請避免散佈WORD, EXCEL 或是 POWERPOINT格式的檔案.
See http://www.fsf.org/philosophy/no-word-attachments.html
and http://www.cyut.edu.tw/~ckhung/published/997nodoc.shtml
----------------------------------
Steven Shiau
E-mail: steven _at_ nchc.org.tw; steven _at_ stick.idv.tw


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 5 lines · Steven Shiau

eth0 can NOT connect to Internet, either it's caused when I move the machine to
different subnet while forgetting change the network setting, or the network cable is disconnected, the Fedore Core 1 takes very long time to boot. It just stops in "Starting NFS service..." for more than 17 minutes... So usually I reboot the machine, and enter the interactive mode to disable the NFS service when it boot.
My point is, is that possible I can make the NFS service startup very
quickly as usual when the eth0 Internet connection is NOT available ?

Most liekly you're using host names in your /etc/exports file and the resolver tries to map these to addresses. Maybe even wildcarded names, I'm not sure if it would try to resolve those too.

In any case, you can either convert your exports file to use IP addresses only, or add all host names to /etc/hosts and make sure nsswitch.conf lists the files target before dns.

Olaf

Signature · 13 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#2 lore raw

Hi,
I do put the IP address in /etc/exports, it looks like:
/tftpboot/node_root 192.168.101.1(ro,sync,async,no_root_squash) /tftpboot/nodes/192.168.101.1/ 192.168.101.1(rw,sync,async,no_root_squash)
/usr 192.168.101.1(ro,sync,async,no_root_squash)
/opt 192.168.101.1(ro,sync,async,no_root_squash) /home 192.168.101.1(rw,sync,async,no_root_squash)

and the hosts in /etc/nsswitch.conf is:
hosts: files nisplus nis dns

So... It's very strange... I tried to debug the /etc/init.d/nfs by appending -x to #/bin/sh, it seems like the boot is stopping here:
action $"Starting NFS services: " /usr/sbin/exportfs -r where in Fedora Core 1, the action actually runs initlog /usr/sbin/exportfs -r
So is it the problem of initlog when my eth0 disconnects ? If so, why ? How can I solve it ?

Thanks in advance.

Quoted 21 lines · Olaf Kirch
Quoted 5 lines · Steven Shiau

eth0 can NOT connect to Internet, either it's caused when I move the machine to
different subnet while forgetting change the network setting, or the network cable is disconnected, the Fedore Core 1 takes very long time to boot. It just stops in "Starting NFS service..." for more than 17 minutes... So usually I reboot the machine, and enter the interactive mode to disable the NFS service when it boot.
My point is, is that possible I can make the NFS service startup very
quickly as usual when the eth0 Internet connection is NOT available ?

Most liekly you're using host names in your /etc/exports file and the resolver tries to map these to addresses. Maybe even wildcarded names, I'm not sure if it would try to resolve those too.

In any case, you can either convert your exports file to use IP addresses only, or add all host names to /etc/hosts and make sure nsswitch.conf lists the files target before dns.

Olaf

Signature · 3 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 
Signature · 17 lines
Please AVOID distributing documents in WORD, EXCEL or POWERPOINT format.
[Chinese Big5] 請避免散佈WORD, EXCEL 或是 POWERPOINT格式的檔案.
See http://www.fsf.org/philosophy/no-word-attachments.html
and http://www.cyut.edu.tw/~ckhung/published/997nodoc.shtml
----------------------------------
Steven Shiau
E-mail: steven _at_ nchc.org.tw; steven _at_ stick.idv.tw


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#3 lore raw
Quoted 2 lines · Steven Shiau

So is it the problem of initlog when my eth0 disconnects ? If so, why ? How can I solve it ?

Did you try putting these addresses into /etc/hosts along with some names? Could be that using addresses is not enough,and exportfs is doing a reverse lookup by default.

Olaf

Signature · 13 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#4 lore raw

Hi, Olaf :
Yes, I did, my /etc/hosts in the NFS server looks like:
------------------------------------------------------
# Do not remove the following line, or various programs

# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
...
192.168.101.254 nfsserver_eth1.drbl.sf.net nfsserver_eth1 drblrh.nchc.org=
.tw
192.168.101.1 drblrh-1-001.drbl.sf.net drblrh-1-001
...
------------------------------------------------------
Any idea ?
Thanks.
Quoted 11 lines · Olaf Kirch

On Sun, Jul 25, 2004 at 11:00:01AM +0800, Steven Shiau wrote:
=20

Quoted 2 lines

So is it the problem of initlog when my eth0 disconnects ? If so, why ? How can I solve it ?

=20
=20
Did you try putting these addresses into /etc/hosts along with some names? Could be that using addresses is not enough,and exportfs is doing a reverse lookup by default.
=20
Olaf

--=20
Say YES to Openoffice.org (www.openoffice.org, openoffice.nchc.org.tw). Please AVOID distributing documents in WORD, EXCEL or POWERPOINT format. [Chinese Big5] =E8=AB=8B=E9=81=BF=E5=85=8D=E6=95=A3=E4=BD=88WORD, EXCEL =E6= =88=96=E6=98=AF POWERPOINT=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=AA=94=E6=A1=88. See http://www.fsf.org/philosophy/no-word-attachments.html
and http://www.cyut.edu.tw/~ckhung/a/c_91.shtml
-------------------------------------------------------------------------=
----
Steven Shiau [Chinese Big5] =E8=95=AD=E5=BF=97=E6=A6=A5
NCHC [Chinese Big5] =E5=9C=8B=E5=AE=B6=E9=AB=98=E9=80=9F=E7=B6=B2=E8=B7=AF= =E8=88=87=E8=A8=88=E7=AE=97=E4=B8=AD=E5=BF=83
E-mail: steven _at_ nchc.org.tw; steven _at_ stick.idv.tw

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs