2004-07-24 06:36:39

by Steven Shiau

[permalink] [raw]
Subject: NFS service takes very long time to start when internet disconnected..

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.
--
Please AVOID distributing documents in WORD, EXCEL or POWERPOINT format.
[Chinese Big5] ???קK???GWORD, EXCEL ?άO 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


2004-07-24 18:20:46

by Olaf Kirch

[permalink] [raw]
Subject: Re: NFS service takes very long time to start when internet disconnected..

On Sat, Jul 24, 2004 at 02:36:35PM +0800, Steven Shiau wrote:
> 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

--
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

2004-07-25 03:00:10

by Steven Shiau

[permalink] [raw]
Subject: Re: NFS service takes very long time to start when internet disconnected..

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.

On Sat, Jul 24, 2004 at 08:19:02PM +0200, Olaf Kirch wrote:
> On Sat, Jul 24, 2004 at 02:36:35PM +0800, Steven Shiau wrote:
> > 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
>
> --
> Olaf Kirch | The Hardware Gods hate me.
> [email protected] |
> ---------------+

--
Please AVOID distributing documents in WORD, EXCEL or POWERPOINT format.
[Chinese Big5] ???קK???GWORD, EXCEL ?άO 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

2004-07-25 12:23:50

by Olaf Kirch

[permalink] [raw]
Subject: Re: NFS service takes very long time to start when internet disconnected..

On Sun, Jul 25, 2004 at 11:00:01AM +0800, Steven Shiau wrote:
> 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
--
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

2004-07-26 06:40:41

by Steven Shiau

[permalink] [raw]
Subject: Re: NFS service takes very long time to start when internet disconnected..

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.

Olaf Kirch wrote:
> On Sun, Jul 25, 2004 at 11:00:01AM +0800, Steven Shiau wrote:
>=20
>>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 (http://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