Re: [SLUG] automated sequential boot of multiple machines

From: Mike Branda (mike@wackyworld.tv)
Date: Wed Nov 16 2005 - 18:04:45 EST


On Wed, 2005-11-16 at 17:03 -0500, Eben King wrote:
> On Wed, 16 Nov 2005, Mike Branda wrote:
>
> > Hey all,
> >
> > I figure I'll put this out there. I'm starting to think of a way that I
> > can bring machines up here in sequence when the power is out for more
> > than the designated run time of the backups. Obviously some machines
> > have services that need to be up before others. I've just been reduced
> > back to a one man operation and if things go amuck I'd like to be able
> > to run a script from a remote machine. I was starting to think of
> > something that uses wake on lan or something combined with a check on
> > that service before the next machine was given a "ring" to start up.
> > Anybody do this in Linux yet?? Is there a project out there or a piece
> > of hardware that does such a thing?? Anybody ever monkey with wake on
> > lan??
>
> That seems to be basically what initscripts-6.95-1 does on my machine:
>
> [root@pc root]# rpm -qf /etc/rc.d/rc3.d
> chkconfig-1.3.6-3
> initscripts-6.95-1
> [root@pc root]# ls /etc/rc.d/rc3.d
> K05saslauthd S12syslog S28autofs S75monitor-cid S90xfs
> K20nfs S13portmap S35sigmonster S80sendmail S91smb
> K34dhcrelay S15festival S45junkbuster S85gpm S95atd
> K35winbind S17keytable S55sshd S85thttpd S95innd
> K50snmpd S20random S56rawdevices S86thttpdmonitor S99local
> K50snmptrapd S25logmonitor S56xinetd S90crond
> S10network S25netfs S65dhcpd S90vmware
>
> S* files get run with the "start" argument (they're all links) with the
> "start" argument upon entering a runlevel, K* files get run with the "stop"
> argument on leaving same. /etc/rc.d/rcN.d corresponds to runlevel N.
> Runlevels are defined in /etc/inittab . Links are maintained by the
> "chkconfig" program, based on info in the header. Before I found it, I
> thought *I* had to do it manually, which would have been a nightmare.
> E.g., at the top of S12syslog:
>
> #!/bin/bash
> #
> # syslog Starts syslogd/klogd.
> #
> #
> # chkconfig: 2345 12 88
> # description: Syslog is the facility by which many daemons use to log \
> # messages to various system log files. It is a good idea to always \
> # run syslog.
> ### BEGIN INIT INFO
> # Provides: $syslog
> ### END INIT INFO

This is for the local machine though. What I need is:

Storm knocks power out for 2 hours. everything is off.

1.) run startservers.sh

2.) wake on lan gateway1

3.) done, return somehow or startservers.sh runs a check on the services
that gateway1 provides.

4.) wake on lan dns_ntp1 - this box is dependent upon an internet
connection provided by gateway1 or services will fail during init i.e.
it cannot boot before the gateway.

5.) done, return somehow or startservers.sh runs a check on the services
that dns_ntp1 provides.

and so on.

The alternative is to push 9 power buttons by hand when appropriate.
This is very tedious and wastes alot of time staring at a monitor
waiting for hardware initialization then init and so on. This is why I
was thinking a wake on lan/script solution or the like would be best.
Unless some hardware or OSS solution exists. It could be run from my
desktop machine.

chkconfig is very cool though by the way. I've set the init header info
up a few times now on my own init scripts for NIC channel bonding and
such.

Mike Branda Jr.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:11:39 EDT