User Tools

Site Tools


heartbeat_plus_hast

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
heartbeat_plus_hast [2012/09/06 13:42]
val
— (current)
Line 1: Line 1:
-====== HEARTBEAT plus HAST ====== 
- 
-  - Состояние init возникает при запуске hastd на secondary узле, если он остановился и стартует раньше primary 
-  - Ситуация Split-Brain возникает при запуске hastd на secondary узле, если он остановился позже primary и heartbeat успел его назначить primary, а запускаются оба узла синхронно и heartbeat считает что primary должен оставаться прежним. 
- 
-<​code>​ 
-nodeN# /​usr/​local/​etc/​rc.d/​heartbeat stop 
- 
-nodeN# cat /​usr/​local/​etc/​ha.d/​resource.d/​hast 
-</​code><​code>​ 
-#!/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 /disk2 
-        ;; 
-stop) 
-        mount | grep -q hast && umount /disk2 
-        hastctl role secondary r0 
-        ;; 
-esac 
- 
-exit 0 
-</​code><​code>​ 
-nodeN# chmod +x /​usr/​local/​etc/​ha.d/​resource.d/​hast 
- 
-nodeN# cat /​usr/​local/​etc/​ha.d/​haresources 
-</​code><​code>​ 
-node2.corpX.un hast 
-</​code><​code>​ 
-nodeN# /​usr/​local/​etc/​rc.d/​heartbeat start 
-</​code>​ 
  
heartbeat_plus_hast.1346924532.txt.gz · Last modified: 2013/05/22 13:50 (external edit)