User Tools

Site Tools


heartbeat_plus_hast

This is an old revision of the document!


HEARTBEAT plus HAST

Состояние init возникает при запуске hastd на secondary узле, если он стартует раньше primary

gateN# /usr/local/etc/rc.d/heartbeat stop

gateN# cat /usr/local/etc/ha.d/resource.d/hast
#!/bin/sh
case $1 in
status)
        hastctl status r0 | grep -q 'role: init' && hastctl role secondary r0
        ;;
start)
        hastctl role primary r0
        sleep 5
        fsck -y -t ufs /dev/hast/r0
        mount /dev/hast/r0 /opt
        ;;
stop)
        mount | grep -q hast && umount /opt
        hastctl role secondary r0
        ;;
esac

exit 0
gateN# chmod +x /usr/local/etc/ha.d/resource.d/hast

gateN# cat /usr/local/etc/ha.d/haresources
gate2.corpX.un hast
gateN# /usr/local/etc/rc.d/heartbeat start
heartbeat_plus_hast.1291284209.txt.gz · Last modified: 2013/05/22 13:50 (external edit)