ADSM-L

Re: Solaris 2.6 and ADSM Client V3.1.0.6

1999-04-21 05:46:51
Subject: Re: Solaris 2.6 and ADSM Client V3.1.0.6
From: Russell Street <russells AT AUCKLAND.AC DOT NZ>
Date: Wed, 21 Apr 1999 21:46:51 +1200
> 1. Why do we need a recycle method? I can't see that being used very often,
> (only if the dsm.opt/sys are changed). I take the simple approach, shutdown 
> and
> then start = recycle!

Some programs support reconfiguration so that recycle != (start+stop).


> 2. If the inittab method works fine, why not just use that?

I don't because inittab is very (errr) vigiorus.  This leads to
unfortunate failure modes.

e.g., If client fails to start up because the password is wrong and it
exits.  If told to, init will keep restarting the client.  While it is
supposed to stop respawning after N goes in M minutes, if it miscounts
you could swamp your ADSM server with failed logins... or have
hundreds of daemons on your client.

That has been my unfortunate experience with inittab.  I stay away
from it ;) ;)




> I was also told, (so I'm not 100% sure that this is right), that the
> /etc/rcX.d is a BSDism retained for compatibility, and the correct
> SysV method is to patch /etc/inittab.

Run levels, inittab and rcX.d scripts are part of the SysV way of
doing things.

/etc/rc.local is a hang up from BSD.  BSD only knows [knew] about the
machine being in single-user or multi-user mode.  Going from single to
multi-user, you run /etc/rc which in turn runs /etc/rc.local.  That is
what I recall from Ultrix & SunOS 4.x.  Modern BSD may be different.
Multi-user to single-user was kill everything except init and then
spawn a Bourne shell.



> 3. The appropriate script or scripts,

Sun generally has one script that takes "start" or "stop".  Hard
linked into multiple places (/etc/init.d, rc2.d, rc0.d, ...)

Whatever you do, this script MUST be a Borne Shell script (/bin/sh).
The /etc/rcX program runs your scripts as "/sbin/sh /etc/rc2.d/SXXfoobar".



The one I use is below on Solaris 2.5.1, 2.6 and 7.


I do not have a useful "stop" clause.  There is little need to do
anything special when the machine is shutting down.  The process will
get a TERM signal automatically, which is all the stop clause would be
doing.

Plus to kill it correctly, you would need the start up script to save
the PID.

Why?  Imagine you just found all the "dsmc" processes and killed them.
Works great at system shutdown time. But if the system admin runs
"Kxxadsm stop", the script when the system is working normally it will
kill all dsmc processes.  If some user is running a restore (or
backup) on a terminal this will ALSO be killed along with the
background process.





Russell
(my 0.2c worth)

============================================================
#!/bin/sh
#!/bin/sh
## =================================================================
## adsm-rc --- start up script for ADSM
##
## =================================================================

ADSM=/opt/IBMadsm-c

state=$1

case $state in

'start')
  LOG=/var/tmp/adsm-sched.log

  if [ -x ${ADSM}/dsmc ] ; then
    echo Starting ADSM scheduler...
    ${ADSM}/dsmc sched -quiet > ${LOG} 2>&1 &
  fi
;;


'stop')
;;
esac








## End of file: adsm-rc
## =================================================================