Add a group
haconf -makerw
hagrp -add vsftpd_grp
hagrp -modify vsftpd_grp SystemList Node01 0 Node02 1
hagrp -autoenable vsftpd_grp -sys Node01
hagrp -autoenable vsftpd_grp -sys Node02
hagrp -modify vsftpd_grp OnlineRetryLimit 3
# start group on both nodes
hagrp -modify vsftpd_grp AutoFailOver 0
hagrp -modify vsftpd_grp Parallel 1
Add Resource
hares -add vsftpd_res Application vsftpd_grp
hares -modify vsftpd_res StartProgram "/etc/init.d/vsftpd start"
hares -modify vsftpd_res StopProgram "/etc/init.d/vsftpd stop"
# if you want to run as root - ignore this line
hares -modify vsftpd_res User a_user_name
# command will be executed as su - a_user_namehares -modify vsftpd_res UseSUDash 1
# Monitor process - whole string as appears in ps -ef output
hares -modify vsftpd_res MonitorProcesses \
"/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf"
# not tested
hares -modify vsftpd_res MonitorProgram "/etc/init.d/vsftpd status"
# does not write a pid file - ignore it
hares -modify vsftpd_res PidFiles "/var/run/vsftpd.pid"
hares -modify vsftpd_res Enabled 1
# Make group dependendt on cluster filesystem (or any other group you wish)
hagrp -link vsftpd_grp CFS_Group online local firm
haconf -dump -makero
Bring vsftpd online
hagrp -online vsftpd_grp -sys Node01
hagrp -online vsftpd_grp -sys Node02
Snip from config file
group mq_group (
SystemList = { Node01 = 0, Node02 = 1 }
AutoFailOver = 0
Parallel = 1
AutoStartList = { Node01, Node02 }
OnlineRetryLimit = 3
)
Application activemq (
StartProgram = "/etc/init.d/vsftpd start"
MonitorProcesses = { "/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf" }
StopProgram = "/etc/init.d/vsftpd stop"
)
requires group CFS_Group online local firm