Resources

From pressy's brainbackup
Jump to: navigation, search

Cluster Resources

Sample NFS Resource

# cd /globalmount
# mkdir -p SUNW.nfs
# vi dfstab.resourcename

# scrgadm -a -t SUNW.nfs	        -> register NFS Agent
# scrgadm -a -g NFSrg -h node1,node2 -y Pathprefix=/NFSshare
# scrgadm -a -L -j NFS-LH -g NFSrg -l nfsshare -n sc_ipmp0@clusternode1,sc_ipmp0@clusternode2
# scrgadm -a -j NFS-storage -g NFSrg -t SUNW.HAStoragePlus -x FilesystemMountPoints=/NFSshare -x AffinityOn=TRUE
# scswitch -Z -g NFSrg		        -> start the group
# scrgadm -a -j NFSres -g NFSrg -t SUNW.nfs -y Resource_dependencies=NFS-storage
# scswitch -e -j NFSres		        -> enable the resource
# scswitch -z -g NFSrg -h clusternode2	-> switch

GDS Resource

# vi /opt/blabla/bin/script.ksh
Exit Codes:
between 0 (OK) and 100 (complete failure)
201 = Error with Failover!
# scrgadm -a -t SUNW.gds	-> register the Agent
# scrgadm -a -g GRUPPE -h clusternode1,clusternode2
# scrgadm -a -j RES -t SUNW.gds -g GRUPPE -x Start_command=/opt..../ksh -x Probe_command=/bin/true -x Network_aware=false
# scswitch -Z -g GRUPPE
# scrgadm -a -t SUNW.gds
# scrgadm -a -g haapp_rg
# scrgadm -a -L -g haapp_rs -l hhead
# scrgadm -a -j haapp_rs -g haapp_rg -t SUNW.gds \
         -y Scalable=false -y Start_timeout=120 \
         -y Stop_timeout=120 -x Probe_timeout=120 \
         -y Port_list="2222/tcp" \
         -x Start_command="/export/ha/appctl/start" \
         -x Stop_command="/export/ha/appctl/stop" \    
         -x Probe_command="/export/app/bin/probe" \
         -x Child_mon_level=0 -y Network_resources_used=<lh-ip> \
         -x Failover_enabled=TRUE -x Stop_signal=9