Re: LDM RHEL Binary RPM, spec & ldmd init script

I'm much more inclined to create a script to perform the simple steps to compile, than to spend a couple of hours (at least, that's what it takes me) to package an RPM that will not be necessarily correct for all systems. I do, however, agree that a service start/stop script is useful. That said, I add a couple of lines in the /etc/rc.d/rc.local file to:
cat the contents of ~ldmd.pid
Remove that file
perform, as ldm, an ldmadmin start
trap an error
remake the queue if necessary
start ldm

That could be modified or cleaned up, but it works on all my LDM systems...

gerry

Art Wildman wrote:
Hi folks,

1. Looking for an LDM RHEL-4+ RPM binary or rpm.spec files? If not, I may be interested in building one for i386 (advice welcome). 2. Does anyone have a ldmd init script for RHEL that can support some of the advanced RH Linux features listed below (chkconfig, service, PID files & locks). 3. Are there any other gotchas (like syslog) running LDM at Boot as a service?

I was following the linux-HA Cluster thread & noticed there are some LDM Docs referencing clusters, but most are geared toward Hi-Performance Clusters, not Hi-Availability (HA) Clusters. Some configs & principles (IP Virtual Server) may translate though. For HA clusters, LDM can be started & stopped via init-scripts in /etc/rc.d/init.d or /etc/ha.d/haresources as Richard noted.

ConfiguringHeartbeat - Linux HA
http://www.linux-ha.org/ConfiguringHeartbeat

LDM Clusters
http://www.unidata.ucar.edu/software/ldm/ldm-6.6.4/basics/cluster.html

LDM at Boot - Init Scripts (this should be included in the ldm-binary.rpm specific to RHELvX) http://www.unidata.ucar.edu/software/ldm/ldm-6.6.4/basics/configuring.html#boot http://www.unidata.ucar.edu/software/ldm/ldm-6.6.4/ldmConfigInstallList.html
ftp://ftp.unidata.ucar.edu/pub/ldm/scripts/linux/ldmd

Comparing it to a simple init script like /etc/rc.d/init.d/atd & we may be able to improve it some & use RHEL service commands, locks & pstools (pgrep, pkill...) to manage the service like:
# chkconfig --level 345 ldmd on
# service ldmd restart
# service ldmd status

# head /etc/rc.d/init.d/atd | grep chkconfig
# chkconfig: 345 95 5
Note: the chkconfig: line determines runlevels & the priority of kill and start scripts (man chkconfig)

# service crond status
crond (pid 1117) is running...
# cat /var/run/crond.pid
1117
# ls -l /var/lock/subsys/crond
-rw-r--r-- 1 root root 0 Jan 5 17:26 /var/lock/subsys/crond

This may help shutdown & restart the ldmd safely during failover in an HA cluster.

-Art@JAX


--
Gerry Creager -- gerry.creager@xxxxxxxx
Texas Mesonet -- AATLT, Texas A&M University        
Cell: 979.229.5301 Office: 979.458.4020  FAX 979.862.3983
MAIL:  AATLT, 3139 TAMU
Physical: 1700 Research Parkway, Suite 160,
College Station, TX 77843-3139



  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the ldm-users archives: