Sun Cluster Data Service for Sun Grid Engine ガイド (Solaris OS 版)

付録  A Sun Cluster HA for Sun Grid Engine リソースを構成および削除するためのファイル

/opt/SUNWscsge/util ディレクトリには、Sun Cluster HA for Sun Grid Engine リソースを構成および削除するプロセスを自動化するスクリプトが含まれます。以降の節では、これらのファイルのリストを示します。

sge_config のリスト

#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# 
# This file will be sourced in by sge_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        COMMDRS - name of the resource for the application
#        QMASTERRS - name of the resource for the application
#        SCHEDDRS - name of the resource for the application
#        RG - name of the resource group containing the resources
#        PORT - name of any port number, as it's ignored
#        LH - name of the LogicalHostname SC resource
#	 SGE_ROOT - SGE_ROOT of this Sun GridEngine Installation
#	 SGE_CELL - SGE_CELL of this Sun GridEngine Installation
#        USE_INTERNAL_DEP - if internal Inter RG-dependency is being
#                   used set this to TRUE else to FALSE.
#

COMMDRS=
QMASTERRS=
SCHEDDRS=
RG=
LH=
SGE_ROOT=
SGE_CELL=
PORT=1234
USE_INTERNAL_DEP=FALSE

sge_register のリスト

#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

. `dirname $0`/sge_config

if [ "${USE_INTERNAL_DEP}" = "FALSE" ]; then
   DEPFLAG="-Z"
else
   DEPFLAG=""
fi

# Disable SGE launch at boot if same exists.
# A marker is left to restore boot launch
# iif SGE cluster agents are removed with:
# sge_remove.

if [ -L /etc/rc2.d/S95rcsge ]; then
   touch $SGE_ROOT/sge_boot_launch_disabled
   rm /etc/rc2.d/S95rcsge
fi


scrgadm -a -j $COMMDRS -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWscsge/bin/sge_commd/start_sge_commd \
-R $COMMDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Stop_command="/opt/SUNWscsge/bin/sge_commd/stop_sge_commd \
-R $COMMDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Probe_command="/opt/SUNWscsge/bin/sge_commd/probe_sge_commd \
-R $COMMDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-y Port_list=$PORT/tcp -y Network_resources_used=$LH \
-x Stop_signal=9 \
-y retry_count=5 -y retry_interval=300


scrgadm -a -j $QMASTERRS -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWscsge/bin/sge_qmaster/start_sge_qmaster \
-R $QMASTERRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Stop_command="/opt/SUNWscsge/bin/sge_qmaster/stop_sge_qmaster \
-R $QMASTERRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Probe_command="/opt/SUNWscsge/bin/sge_qmaster/probe_sge_qmaster \
-R $QMASTERRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-y Port_list=$PORT/tcp -y Network_resources_used=$LH \
-x Stop_signal=9 \
-x probe_timeout=90 -y Thorough_probe_interval=120 \
-y retry_count=2 -y retry_interval=900 \
-y Resource_dependencies=$COMMDRS

scrgadm -a -j $SCHEDDRS -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWscsge/bin/sge_schedd/start_sge_schedd \
-R $SCHEDDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Stop_command="/opt/SUNWscsge/bin/sge_schedd/stop_sge_schedd \
-R $SCHEDDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-x Probe_command="/opt/SUNWscsge/bin/sge_schedd/probe_sge_schedd \
-R $SCHEDDRS -G $RG -S $SGE_ROOT -C $SGE_CELL " \
-y Port_list=$PORT/tcp -y Network_resources_used=$LH \
-x Stop_signal=9 \
-x probe_timeout=90 -y Thorough_probe_interval=120 \
-y retry_count=2 -y retry_interval=900 \
-y Resource_dependencies=$QMASTERRS

sge_remove のリスト

#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

. `dirname $0`/sge_config

scswitch -n -j $SCHEDDRS
scswitch -n -j $QMASTERRS
scswitch -n -j $COMMDRS
scrgadm -r -j  $SCHEDDRS
scrgadm -r -j  $QMASTERRS
scrgadm -r -j  $COMMDRS

# SGE launch at boot re-enabled, and
# run-level script link re-established.

if [ -e $SGE_ROOT/sge_boot_launch_disabled && -e /etc/init.d/rcsge ]; then
   rm $SGE_ROOT/sge_boot_launch_disabled
   ln -s /etc/init.d/rcsge /etc/rc2.d/S95rcsge
   chmod 111 /etc/rc2.d/S95rcsge
fi