This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
heartbeat_plus_gmirror_ggate [2010/02/27 12:52] val created |
heartbeat_plus_gmirror_ggate [2010/04/30 09:59] val |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== HEARTBEAT plus GMIRROR GGATE ====== | ====== HEARTBEAT plus GMIRROR GGATE ====== | ||
+ | |||
+ | ===== Запуск и автозапуск ggated ===== | ||
+ | <code> | ||
+ | [gateN:~] # ggated | ||
+ | |||
+ | [gateN:~] # cat /etc/rc.local | ||
+ | ggated | ||
+ | </code> | ||
===== Настройка heartbeat ===== | ===== Настройка heartbeat ===== | ||
<code> | <code> | ||
+ | [gateN:~] # /usr/local/etc/rc.d/heartbeat stop | ||
+ | |||
[gateN:~] # cat /usr/local/etc/ha.d/haresources | [gateN:~] # cat /usr/local/etc/ha.d/haresources | ||
- | gate1.corpX.un gmirror | + | gate2.corpX.un gmirror |
</code><code> | </code><code> | ||
[gateN:~] # cat /usr/local/etc/ha.d/resource.d/gmirror | [gateN:~] # cat /usr/local/etc/ha.d/resource.d/gmirror | ||
Line 39: | Line 49: | ||
ps ax | grep -v grep | grep -q ggatec && killall -9 ggatec | ps ax | grep -v grep | grep -q ggatec && killall -9 ggatec | ||
) | ) | ||
+ | ps ax | grep -v grep | grep -q gated || ggated | ||
;; | ;; | ||
esac | esac | ||
+ | |||
+ | exit 0 | ||
</code><code> | </code><code> | ||
- | [gate1:~] # scp /usr/local/etc/ha.d/resource.d/gmirror intgate2:/usr/local/etc/ha.d/resource.d/gmirror | + | [gateN:~] # chmod +x /usr/local/etc/ha.d/resource.d/gmirror |
+ | </code><code> | ||
+ | [gateN:~] # /usr/local/etc/rc.d/heartbeat start | ||
</code> | </code> | ||
===== Автоматизация подключения диска backup ===== | ===== Автоматизация подключения диска backup ===== | ||
<code> | <code> | ||
- | [gateN:~] # crontab -l | + | [gateN:~] # mkdir /usr/local/etc/scripts/ |
- | * * * * * /usr/local/etc/scripts/gmirror | + | |
- | </code><code> | + | |
[gateN:~] # cat /usr/local/etc/scripts/gmirror | [gateN:~] # cat /usr/local/etc/scripts/gmirror | ||
</code><code> | </code><code> | ||
Line 83: | Line 97: | ||
) | ) | ||
</code><code> | </code><code> | ||
- | [gate1:~] # scp /usr/local/etc/scripts/gmirror intgate2:/usr/local/etc/scripts/gmirror | + | [gateN:~] # chmod +x /usr/local/etc/scripts/gmirror |
+ | </code><code> | ||
+ | [gateN:~] # crontab -l | ||
+ | * * * * * /usr/local/etc/scripts/gmirror | ||
</code> | </code> | ||