[root@file1 ha.d]# grep -v "^#" ./haresources
file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drbd1::/mnt/pgdir::ext3
[root@file1 ha.d]#
是不是哪里写作了,大小写问题?我想自动启动drbd 和自动挂接/mnt/pgdir,哪里写错了么?我找不到答案了
5 个解决方案
#1
这是我详细的配置和状态
[root@file1 ha.d]# service heartbeat start
Starting High-Availability services:
2012/02/18_02:48:08 INFO: Resource is stopped
[ OK ]
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# grep -v "^#" ha.cf
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast eth0 192.168.1.30
auto_failback off
node file1
node file2
ping 192.168.1.1
respawn hacluster /usr/lib64/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
hopfudge 1
deadping 30
--------------
[root@file1 ha.d]# grep -v "^#" authkeys
auth 1
1 crc
[root@file1 ha.d]#
--------------------
[root@file1 ha.d]# cat /var/log/ha-log
heartbeat[9139]: 2012/02/18_02:48:08 info: Version 2 support: false
heartbeat[9139]: 2012/02/18_02:48:08 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[9139]: 2012/02/18_02:48:08 info: **************************
heartbeat[9139]: 2012/02/18_02:48:08 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[9140]: 2012/02/18_02:48:08 info: heartbeat: version 2.1.3
heartbeat[9140]: 2012/02/18_02:48:09 info: Heartbeat generation: 1329418078
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound send socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound receive socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ping heartbeat started.
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[9140]: 2012/02/18_02:48:09 info: Local status now set to: 'up'
heartbeat[9140]: 2012/02/18_02:48:09 info: Link 192.168.1.1:192.168.1.1 up.
heartbeat[9140]: 2012/02/18_02:48:09 info: Status update for node 192.168.1.1: status ping
[root@file1 ha.d]#
-----------------------
[root@file1 ha.d]# cat /var/log/messages
Feb 18 02:48:08 file1 logd: [9047]: info: logd started with default configuration.
Feb 18 02:48:08 file1 logd: [9047]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 logd: [9051]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Version 2 support: false
Feb 18 02:48:08 file1 heartbeat: [9139]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Feb 18 02:48:08 file1 heartbeat: [9139]: info: **************************
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Configuration validated. Starting heartbeat 2.1.3
Feb 18 02:48:08 file1 heartbeat: [9140]: info: heartbeat: version 2.1.3
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Heartbeat generation: 1329418078
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound send socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound receive socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ping heartbeat started.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Local status now set to: 'up'
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Link 192.168.1.1:192.168.1.1 up.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Status update for node 192.168.1.1: status ping
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: node file2: is dead
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Comm_now_up(): updating status to active
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Local status now set to: 'active'
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Starting child client "/usr/lib64/heartbeat/ipfail" (694,694)
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: No STONITH device configured.
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: Shared disks are not protected.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Resources being acquired from file2.
Feb 18 02:50:09 file1 heartbeat: [9157]: info: Starting "/usr/lib64/heartbeat/ipfail" as uid 694 gid 694 (pid 9157)
Feb 18 02:50:09 file1 harc[9158]: info: Running /etc/ha.d/rc.d/status status
Feb 18 02:50:09 file1 mach_down[9191]: info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
Feb 18 02:50:09 file1 mach_down[9191]: info: mach_down takeover complete for node file2.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Initial resource acquisition complete (T_RESOURCES(us))
Feb 18 02:50:09 file1 heartbeat: [9140]: info: mach_down takeover complete.
Feb 18 02:50:09 file1 IPaddr[9232]: INFO: Resource is stopped
Feb 18 02:50:09 file1 heartbeat: [9159]: info: Local Resource acquisition completed.
Feb 18 02:50:09 file1 harc[9295]: info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
Feb 18 02:50:09 file1 ip-request-resp[9295]: received ip-request-resp IPaddr::192.168.1.123/24/eth0:1 OK yes
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Acquiring resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:09 file1 IPaddr[9343]: INFO: Resource is stopped
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/IPaddr 192.168.1.123/24/eth0:1 start
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: Using calculated netmask for 192.168.1.123: 255.255.255.0
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: eval ifconfig eth0:0 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
Feb 18 02:50:09 file1 avahi-daemon[4246]: Registering new address record for 192.168.1.123 on eth0.
Feb 18 02:50:09 file1 IPaddr[9412]: INFO: Success
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 start
Feb 18 02:50:14 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:14 file1 ResourceManager[9316]: CRIT: Giving up resources due to failure of drbddisk::r0
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Releasing resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /mnt/pgdir ext3 stop
Feb 18 02:50:14 file1 Filesystem[9647]: WARNING: Couldn't find device [/dev/drbd1]. Expected /dev/??? to exist
Feb 18 02:50:14 file1 Filesystem[9647]: INFO: Running stop for /dev/drbd1 on /mnt/pgdir
Feb 18 02:50:14 file1 Filesystem[9636]: INFO: Success
Feb 18 02:50:15 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
Feb 18 02:50:17 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Retrying failed stop operation [drbddisk::r0]
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
[root@file1 ha.d]#
------------我要的i没起来--所以服务也没起来------
[root@file1 ha.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A9:52:87
inet addr:192.168.1.29 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5624 errors:0 dropped:0 overruns:0 frame:0
TX packets:3355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:620796 (606.2 KiB) TX bytes:469290 (458.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:896 (896.0 b) TX bytes:896 (896.0 b)
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# lsmod |grep drbd
drbd 257671 0
[root@file1 ha.d]#
[root@file1 ha.d]# service heartbeat start
Starting High-Availability services:
2012/02/18_02:48:08 INFO: Resource is stopped
[ OK ]
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# grep -v "^#" ha.cf
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast eth0 192.168.1.30
auto_failback off
node file1
node file2
ping 192.168.1.1
respawn hacluster /usr/lib64/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
hopfudge 1
deadping 30
--------------
[root@file1 ha.d]# grep -v "^#" authkeys
auth 1
1 crc
[root@file1 ha.d]#
--------------------
[root@file1 ha.d]# cat /var/log/ha-log
heartbeat[9139]: 2012/02/18_02:48:08 info: Version 2 support: false
heartbeat[9139]: 2012/02/18_02:48:08 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[9139]: 2012/02/18_02:48:08 info: **************************
heartbeat[9139]: 2012/02/18_02:48:08 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[9140]: 2012/02/18_02:48:08 info: heartbeat: version 2.1.3
heartbeat[9140]: 2012/02/18_02:48:09 info: Heartbeat generation: 1329418078
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound send socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound receive socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ping heartbeat started.
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[9140]: 2012/02/18_02:48:09 info: Local status now set to: 'up'
heartbeat[9140]: 2012/02/18_02:48:09 info: Link 192.168.1.1:192.168.1.1 up.
heartbeat[9140]: 2012/02/18_02:48:09 info: Status update for node 192.168.1.1: status ping
[root@file1 ha.d]#
-----------------------
[root@file1 ha.d]# cat /var/log/messages
Feb 18 02:48:08 file1 logd: [9047]: info: logd started with default configuration.
Feb 18 02:48:08 file1 logd: [9047]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 logd: [9051]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Version 2 support: false
Feb 18 02:48:08 file1 heartbeat: [9139]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Feb 18 02:48:08 file1 heartbeat: [9139]: info: **************************
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Configuration validated. Starting heartbeat 2.1.3
Feb 18 02:48:08 file1 heartbeat: [9140]: info: heartbeat: version 2.1.3
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Heartbeat generation: 1329418078
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound send socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound receive socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ping heartbeat started.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Local status now set to: 'up'
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Link 192.168.1.1:192.168.1.1 up.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Status update for node 192.168.1.1: status ping
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: node file2: is dead
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Comm_now_up(): updating status to active
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Local status now set to: 'active'
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Starting child client "/usr/lib64/heartbeat/ipfail" (694,694)
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: No STONITH device configured.
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: Shared disks are not protected.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Resources being acquired from file2.
Feb 18 02:50:09 file1 heartbeat: [9157]: info: Starting "/usr/lib64/heartbeat/ipfail" as uid 694 gid 694 (pid 9157)
Feb 18 02:50:09 file1 harc[9158]: info: Running /etc/ha.d/rc.d/status status
Feb 18 02:50:09 file1 mach_down[9191]: info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
Feb 18 02:50:09 file1 mach_down[9191]: info: mach_down takeover complete for node file2.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Initial resource acquisition complete (T_RESOURCES(us))
Feb 18 02:50:09 file1 heartbeat: [9140]: info: mach_down takeover complete.
Feb 18 02:50:09 file1 IPaddr[9232]: INFO: Resource is stopped
Feb 18 02:50:09 file1 heartbeat: [9159]: info: Local Resource acquisition completed.
Feb 18 02:50:09 file1 harc[9295]: info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
Feb 18 02:50:09 file1 ip-request-resp[9295]: received ip-request-resp IPaddr::192.168.1.123/24/eth0:1 OK yes
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Acquiring resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:09 file1 IPaddr[9343]: INFO: Resource is stopped
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/IPaddr 192.168.1.123/24/eth0:1 start
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: Using calculated netmask for 192.168.1.123: 255.255.255.0
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: eval ifconfig eth0:0 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
Feb 18 02:50:09 file1 avahi-daemon[4246]: Registering new address record for 192.168.1.123 on eth0.
Feb 18 02:50:09 file1 IPaddr[9412]: INFO: Success
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 start
Feb 18 02:50:14 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:14 file1 ResourceManager[9316]: CRIT: Giving up resources due to failure of drbddisk::r0
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Releasing resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /mnt/pgdir ext3 stop
Feb 18 02:50:14 file1 Filesystem[9647]: WARNING: Couldn't find device [/dev/drbd1]. Expected /dev/??? to exist
Feb 18 02:50:14 file1 Filesystem[9647]: INFO: Running stop for /dev/drbd1 on /mnt/pgdir
Feb 18 02:50:14 file1 Filesystem[9636]: INFO: Success
Feb 18 02:50:15 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
Feb 18 02:50:17 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Retrying failed stop operation [drbddisk::r0]
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
[root@file1 ha.d]#
------------我要的i没起来--所以服务也没起来------
[root@file1 ha.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A9:52:87
inet addr:192.168.1.29 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5624 errors:0 dropped:0 overruns:0 frame:0
TX packets:3355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:620796 (606.2 KiB) TX bytes:469290 (458.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:896 (896.0 b) TX bytes:896 (896.0 b)
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# lsmod |grep drbd
drbd 257671 0
[root@file1 ha.d]#
#2
搞定了
#3
=。= 上香给google大神...没有搞不定的....分享下原因吧....
#4
先看下错误日志
#5
原因是,我忘记了启动drbd了,就直接挂接服务,所以出现了那个问题,
后来,有做,又出现脑裂问题,刚刚解决,解决方法google,这个东西真是要命呀,单元下周搞定
后来,有做,又出现脑裂问题,刚刚解决,解决方法google,这个东西真是要命呀,单元下周搞定
#1
这是我详细的配置和状态
[root@file1 ha.d]# service heartbeat start
Starting High-Availability services:
2012/02/18_02:48:08 INFO: Resource is stopped
[ OK ]
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# grep -v "^#" ha.cf
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast eth0 192.168.1.30
auto_failback off
node file1
node file2
ping 192.168.1.1
respawn hacluster /usr/lib64/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
hopfudge 1
deadping 30
--------------
[root@file1 ha.d]# grep -v "^#" authkeys
auth 1
1 crc
[root@file1 ha.d]#
--------------------
[root@file1 ha.d]# cat /var/log/ha-log
heartbeat[9139]: 2012/02/18_02:48:08 info: Version 2 support: false
heartbeat[9139]: 2012/02/18_02:48:08 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[9139]: 2012/02/18_02:48:08 info: **************************
heartbeat[9139]: 2012/02/18_02:48:08 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[9140]: 2012/02/18_02:48:08 info: heartbeat: version 2.1.3
heartbeat[9140]: 2012/02/18_02:48:09 info: Heartbeat generation: 1329418078
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound send socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound receive socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ping heartbeat started.
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[9140]: 2012/02/18_02:48:09 info: Local status now set to: 'up'
heartbeat[9140]: 2012/02/18_02:48:09 info: Link 192.168.1.1:192.168.1.1 up.
heartbeat[9140]: 2012/02/18_02:48:09 info: Status update for node 192.168.1.1: status ping
[root@file1 ha.d]#
-----------------------
[root@file1 ha.d]# cat /var/log/messages
Feb 18 02:48:08 file1 logd: [9047]: info: logd started with default configuration.
Feb 18 02:48:08 file1 logd: [9047]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 logd: [9051]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Version 2 support: false
Feb 18 02:48:08 file1 heartbeat: [9139]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Feb 18 02:48:08 file1 heartbeat: [9139]: info: **************************
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Configuration validated. Starting heartbeat 2.1.3
Feb 18 02:48:08 file1 heartbeat: [9140]: info: heartbeat: version 2.1.3
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Heartbeat generation: 1329418078
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound send socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound receive socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ping heartbeat started.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Local status now set to: 'up'
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Link 192.168.1.1:192.168.1.1 up.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Status update for node 192.168.1.1: status ping
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: node file2: is dead
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Comm_now_up(): updating status to active
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Local status now set to: 'active'
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Starting child client "/usr/lib64/heartbeat/ipfail" (694,694)
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: No STONITH device configured.
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: Shared disks are not protected.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Resources being acquired from file2.
Feb 18 02:50:09 file1 heartbeat: [9157]: info: Starting "/usr/lib64/heartbeat/ipfail" as uid 694 gid 694 (pid 9157)
Feb 18 02:50:09 file1 harc[9158]: info: Running /etc/ha.d/rc.d/status status
Feb 18 02:50:09 file1 mach_down[9191]: info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
Feb 18 02:50:09 file1 mach_down[9191]: info: mach_down takeover complete for node file2.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Initial resource acquisition complete (T_RESOURCES(us))
Feb 18 02:50:09 file1 heartbeat: [9140]: info: mach_down takeover complete.
Feb 18 02:50:09 file1 IPaddr[9232]: INFO: Resource is stopped
Feb 18 02:50:09 file1 heartbeat: [9159]: info: Local Resource acquisition completed.
Feb 18 02:50:09 file1 harc[9295]: info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
Feb 18 02:50:09 file1 ip-request-resp[9295]: received ip-request-resp IPaddr::192.168.1.123/24/eth0:1 OK yes
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Acquiring resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:09 file1 IPaddr[9343]: INFO: Resource is stopped
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/IPaddr 192.168.1.123/24/eth0:1 start
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: Using calculated netmask for 192.168.1.123: 255.255.255.0
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: eval ifconfig eth0:0 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
Feb 18 02:50:09 file1 avahi-daemon[4246]: Registering new address record for 192.168.1.123 on eth0.
Feb 18 02:50:09 file1 IPaddr[9412]: INFO: Success
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 start
Feb 18 02:50:14 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:14 file1 ResourceManager[9316]: CRIT: Giving up resources due to failure of drbddisk::r0
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Releasing resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /mnt/pgdir ext3 stop
Feb 18 02:50:14 file1 Filesystem[9647]: WARNING: Couldn't find device [/dev/drbd1]. Expected /dev/??? to exist
Feb 18 02:50:14 file1 Filesystem[9647]: INFO: Running stop for /dev/drbd1 on /mnt/pgdir
Feb 18 02:50:14 file1 Filesystem[9636]: INFO: Success
Feb 18 02:50:15 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
Feb 18 02:50:17 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Retrying failed stop operation [drbddisk::r0]
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
[root@file1 ha.d]#
------------我要的i没起来--所以服务也没起来------
[root@file1 ha.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A9:52:87
inet addr:192.168.1.29 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5624 errors:0 dropped:0 overruns:0 frame:0
TX packets:3355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:620796 (606.2 KiB) TX bytes:469290 (458.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:896 (896.0 b) TX bytes:896 (896.0 b)
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# lsmod |grep drbd
drbd 257671 0
[root@file1 ha.d]#
[root@file1 ha.d]# service heartbeat start
Starting High-Availability services:
2012/02/18_02:48:08 INFO: Resource is stopped
[ OK ]
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# grep -v "^#" ha.cf
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast eth0 192.168.1.30
auto_failback off
node file1
node file2
ping 192.168.1.1
respawn hacluster /usr/lib64/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
hopfudge 1
deadping 30
--------------
[root@file1 ha.d]# grep -v "^#" authkeys
auth 1
1 crc
[root@file1 ha.d]#
--------------------
[root@file1 ha.d]# cat /var/log/ha-log
heartbeat[9139]: 2012/02/18_02:48:08 info: Version 2 support: false
heartbeat[9139]: 2012/02/18_02:48:08 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[9139]: 2012/02/18_02:48:08 info: **************************
heartbeat[9139]: 2012/02/18_02:48:08 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[9140]: 2012/02/18_02:48:08 info: heartbeat: version 2.1.3
heartbeat[9140]: 2012/02/18_02:48:09 info: Heartbeat generation: 1329418078
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound send socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: bound receive socket to device: eth0
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
heartbeat[9140]: 2012/02/18_02:48:09 info: glib: ping heartbeat started.
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[9140]: 2012/02/18_02:48:09 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[9140]: 2012/02/18_02:48:09 info: Local status now set to: 'up'
heartbeat[9140]: 2012/02/18_02:48:09 info: Link 192.168.1.1:192.168.1.1 up.
heartbeat[9140]: 2012/02/18_02:48:09 info: Status update for node 192.168.1.1: status ping
[root@file1 ha.d]#
-----------------------
[root@file1 ha.d]# cat /var/log/messages
Feb 18 02:48:08 file1 logd: [9047]: info: logd started with default configuration.
Feb 18 02:48:08 file1 logd: [9047]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 logd: [9051]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Version 2 support: false
Feb 18 02:48:08 file1 heartbeat: [9139]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Feb 18 02:48:08 file1 heartbeat: [9139]: info: **************************
Feb 18 02:48:08 file1 heartbeat: [9139]: info: Configuration validated. Starting heartbeat 2.1.3
Feb 18 02:48:08 file1 heartbeat: [9140]: info: heartbeat: version 2.1.3
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Heartbeat generation: 1329418078
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound send socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: bound receive socket to device: eth0
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ucast: started on port 694 interface eth0 to 192.168.1.30
Feb 18 02:48:09 file1 heartbeat: [9140]: info: glib: ping heartbeat started.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_TriggerHandler: Added signal manual handler
Feb 18 02:48:09 file1 heartbeat: [9140]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Local status now set to: 'up'
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Link 192.168.1.1:192.168.1.1 up.
Feb 18 02:48:09 file1 heartbeat: [9140]: info: Status update for node 192.168.1.1: status ping
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: node file2: is dead
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Comm_now_up(): updating status to active
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Local status now set to: 'active'
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Starting child client "/usr/lib64/heartbeat/ipfail" (694,694)
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: No STONITH device configured.
Feb 18 02:50:09 file1 heartbeat: [9140]: WARN: Shared disks are not protected.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Resources being acquired from file2.
Feb 18 02:50:09 file1 heartbeat: [9157]: info: Starting "/usr/lib64/heartbeat/ipfail" as uid 694 gid 694 (pid 9157)
Feb 18 02:50:09 file1 harc[9158]: info: Running /etc/ha.d/rc.d/status status
Feb 18 02:50:09 file1 mach_down[9191]: info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
Feb 18 02:50:09 file1 mach_down[9191]: info: mach_down takeover complete for node file2.
Feb 18 02:50:09 file1 heartbeat: [9140]: info: Initial resource acquisition complete (T_RESOURCES(us))
Feb 18 02:50:09 file1 heartbeat: [9140]: info: mach_down takeover complete.
Feb 18 02:50:09 file1 IPaddr[9232]: INFO: Resource is stopped
Feb 18 02:50:09 file1 heartbeat: [9159]: info: Local Resource acquisition completed.
Feb 18 02:50:09 file1 harc[9295]: info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
Feb 18 02:50:09 file1 ip-request-resp[9295]: received ip-request-resp IPaddr::192.168.1.123/24/eth0:1 OK yes
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Acquiring resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:09 file1 IPaddr[9343]: INFO: Resource is stopped
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/IPaddr 192.168.1.123/24/eth0:1 start
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: Using calculated netmask for 192.168.1.123: 255.255.255.0
Feb 18 02:50:09 file1 IPaddr[9441]: INFO: eval ifconfig eth0:0 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
Feb 18 02:50:09 file1 avahi-daemon[4246]: Registering new address record for 192.168.1.123 on eth0.
Feb 18 02:50:09 file1 IPaddr[9412]: INFO: Success
Feb 18 02:50:09 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 start
Feb 18 02:50:14 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:14 file1 ResourceManager[9316]: CRIT: Giving up resources due to failure of drbddisk::r0
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Releasing resource group: file1 IPaddr::192.168.1.123/24/eth0:1 drbddisk::r0 Filesystem::/dev/drb
d1::/mnt/pgdir::ext3
Feb 18 02:50:14 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /mnt/pgdir ext3 stop
Feb 18 02:50:14 file1 Filesystem[9647]: WARNING: Couldn't find device [/dev/drbd1]. Expected /dev/??? to exist
Feb 18 02:50:14 file1 Filesystem[9647]: INFO: Running stop for /dev/drbd1 on /mnt/pgdir
Feb 18 02:50:14 file1 Filesystem[9636]: INFO: Success
Feb 18 02:50:15 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
Feb 18 02:50:17 file1 ResourceManager[9316]: ERROR: Return code 1 from /etc/ha.d/resource.d/drbddisk
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Retrying failed stop operation [drbddisk::r0]
Feb 18 02:50:18 file1 ResourceManager[9316]: info: Running /etc/ha.d/resource.d/drbddisk r0 stop
[root@file1 ha.d]#
------------我要的i没起来--所以服务也没起来------
[root@file1 ha.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A9:52:87
inet addr:192.168.1.29 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5624 errors:0 dropped:0 overruns:0 frame:0
TX packets:3355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:620796 (606.2 KiB) TX bytes:469290 (458.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:896 (896.0 b) TX bytes:896 (896.0 b)
[root@file1 ha.d]#
----------------------
[root@file1 ha.d]# lsmod |grep drbd
drbd 257671 0
[root@file1 ha.d]#
#2
搞定了
#3
=。= 上香给google大神...没有搞不定的....分享下原因吧....
#4
先看下错误日志
#5
原因是,我忘记了启动drbd了,就直接挂接服务,所以出现了那个问题,
后来,有做,又出现脑裂问题,刚刚解决,解决方法google,这个东西真是要命呀,单元下周搞定
后来,有做,又出现脑裂问题,刚刚解决,解决方法google,这个东西真是要命呀,单元下周搞定