Operating System - HP-UX
1784540 Members
1625 Online
109157 Solutions
New Discussion юеВ

Re: No Network = Very slow Boot

 
Mark Fisher_4
Frequent Advisor

No Network = Very slow Boot

Just curious what causes this and if there is a work around. If we attempt to boot a server that has it's network down (cable unpluged, network switch down, etc.), it takes over and hour to boot. It hangs forever starting up things like SNMP, mail or other network based apps. Is there a way to establish a timeout for these /sbin/rc2.d startup scripts so we don't have to wait forever? You may ask why, but unfortunately, we have ran into this many times with unplugged cables, etc. Yup, it's a Tier-1 data center!!!
We need a way to get the server back up much faster than this...

Any idea's?
6 REPLIES 6

Re: No Network = Very slow Boot

Usually this is down to name service issues. Edit /etc/nsswitch.conf to ensure that you always reference files before DNS.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Peter Godron
Honored Contributor

Re: No Network = Very slow Boot

Mark,
you could try and shuffle the order of execution of scripts around by changing the script names.
So if you don't need mail to continue your startup,leave it right until the end of the startup.
That way you get a machine you can log onto, and the other services will start up as and when possible.
ed e
Advisor

Re: No Network = Very slow Boot

also you can try interupting the currect script by the console using CTRL SHIFT | (pipe)
A. Clay Stephenson
Acclaimed Contributor

Re: No Network = Very slow Boot

In principal, one could code timeouts for anything started by rc but this seems all but pointless to me. The real problem is not the rc scripts but rather the network -- that is where you should focus your attention. I can't imagine how network cables could ever be unplugged in such an environment --- or if it did happen, I can assure you that it would only happen once in my data center. You need to fix your procedures. Moreover, ask yourself just how useful a server without a network connection (even in run-state 3 or 4) is going to be.
If it ain't broke, I can fix that.
Alzhy
Honored Contributor

Re: No Network = Very slow Boot

It's because most of the started services depend on you having a valid networking config started. So if it was already config'd in the first place and brought up disconnected from the LAN -- you will have the sumptoms you've described.

Do "CTRL-|" to abort/fail each step or whenever you appear hung until you get to the login prompt. BEWARE though.. do not execute any GUI (i.e. SAM) or SWINSTALL that also rely ont the network as you'll also likely will get stuck.

You may also want to boot to maint mode and
"blank" your network config (/etc/rc.config.d/netconf) so it's networking only uses the lopback interface.

Curious though -- why would you want o bring it up w/o a LAN drop? Was the server moved into your DC and you want to reconfigure its network? Before it's shut down - you would have just simply blanked its network config so on startup, it will prompt you for new networking params... It's simply "cp /usr/newconfig/etc/rc.config.d/netconf /etc/rc.config.d/netconf"
Hakuna Matata.
Bill Hassell
Honored Contributor

Re: No Network = Very slow Boot

If the network is down, then the services should not be running. If you are booting a server without a working network, just boot into single user mode and you'll get fast response. With some careful/clever coding, you might write a program that determines the network is down, then modify all the services in /etc/rc.config.d (SNMP, NFS, sendmail, etc) to be disabled. But the point is who cares if the server is running when no one can access it?

You may want to evaluate whether you need SNMP (only used with a network management programs), NFS, sendmail, etc. If they aren't used, they should be disabled all the time.


Bill Hassell, sysadmin