[SUMMARY]: shutdown script for Solaris 8

From: Min Oo Tint <min_at_psde.mec.mei.co.jp>
Date: Tue Jul 16 2002 - 11:42:16 EDT
Hi,

Many thanks to all replies. The replies I received below, 8) summarises the
steps I can take.
I'll try this when I have a chance to shutdown again.

Commands and Man pages suggested.

1) /usr/sbin/shutdown
2) shutdown -y -g0 -i5 - did shutdown but still get "RPC... not registered"
3) init 0 or init 5 for shutdown or init 6 for restart
4) RTFM 
6) See man pages for init, shutdown and halt.
7) shutdown -y -g0 -i6 - reboot

8) SUGGESTIONS:

----

I'd rather suspect that some services
are being shut down in the wrong order. Any local additions to the rc?.d
directories? If so, you should check the interdependencies.

You can debug this by running the shutdown scripts by hand, one by one

----

For the most part the "RPC... not registered" messages in a shutdown
sequence are just fodder,   you may notice that vold is listed as the
culprit.  It happens because vold and RPC can shut down in the wrong order
and vold complains.  Data loss because of that message is not a concern.
As far as shutdown scripts for your servers, I would just suggest using the
init level rc's to do the shutdown for you.  Just make scripts that have
start/stop cases in them that shut down all of your services. Place them in
the right run level dir and make them with K<number><name> where <number>
determines at what order the script is run (ie, kill your oracle instance
and wait for a clean shutdown _after_ you kill middleware etc) if there are
two scripts in the init level dir that have the same number they are sorted
alpha, K32apache will run before K32xylogic.  Also it is pretty standard to
link the scripts back to /etc/init.d as then central store.

----

You could edit /sbin/rc5  and have it verbosely log which scripts
it executes when the system goes down.

----

Solaris 8 shoudl kill all processes; my experience is that it does.

Does your system run any special software?

"Program not registered" is a bug; it could be an interaction between
NFS and vold.

----

In that case, the error message is just a "red herring"; the actual
reason why your system hangs on shutdown is different.

----

The standard script should do this properly as long as you use "init 5" or
"init 6" or equavalent invocations of shutdown(1m).

The "RPC not registered" is probably a remnant of old mounts in /etc/rmtab.

Try "/etc/init.d/nfs.server stop" and you will get similar messages.

Then clear /etc/rmtab and restart NFS.

----

this sounds like you're having a service running that isn't correctly
configured (and maybe not even used). i had something like that too, but
it's a long time ago; i can't remember anymore, sorry :) if you runn the
killscripts by hand, you should be able to find out which one gives you the
error message and fix it.

----

Nope, init 0 or shutdown will run all the kill scripts, you must have
installed some custom package that is attempting to shut a service down
but cannot.

----

hmmm does the system finally shutdown at all or not? what happens if you
manually run the killscripts? ie. check /etc/rc2.d/S71rpc and K71rpc (or
whatever the numbering is on your system). which processes complain on
shutdown? probably you can just disable the start script for the offending
service (ie. mv S99myservice s99myservice).

----

All important processes should have shutdown scripts in place so that init 0
(or similar) can be used safely. The reboot command does NOT shut down
processes correctly.

----

rpc errors aren't a real big concern when you're shutting the system down.
Eventually init will kill all processes and shutdown.

----


QUESTION:

I would like to know if someone has written a script or script exists to
shutdown Solaris 8 running on Sparc. It would like it to kill all processes,
un-mount etc before shutting down the machine.

Any help would be appreciated and like always I'll summaries this.

--------------------

It may sound like a stupid question and have done RTFM but it has been for
some time now I can not shutdown safely due to problem with "rpc... not
registered"
messages appearing when attempting to shutdown, I know you need you shutdown
services but which ones before shutdown would work properly.
 << File: Min Tint - PSDE (E-mail).vcf >> 
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Jul 16 11:45:11 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:49 EST