[Linux-HA] Newbie's resources not flying

Helmut Wollmersdorfer helmut.wollmersdorfer at gmx.at
Wed Mar 16 08:34:57 MST 2005


J. B. Schatz wrote:

>>>>haresources file:
>>>>ns1 201.225.35.18/28/eth0 drbddisk::r0
>>>>Filesystem::/dev/drbd/0::/home::reiserfs samba

> If the log files seem not to contain a clue, then can anyone please
> suggest a different way to troubleshoot the problem I'm having with my
> haresources not flying?

Does your service-IP 201.225.35.18 exist, is created by HA?

This is a example of my haresources:
via1 192.168.0.9 drbddisk::drbd-web Filesystem::/dev/drbd0::/ha::ext3 
apache2

via1:# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:63:C4:EB:36
           inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::240:63ff:fec4:eb36/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1054005 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1053357 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:184396035 (175.8 MiB)  TX bytes:145035136 (138.3 MiB)
           Interrupt:11 Base address:0xdc00

eth0:0    Link encap:Ethernet  HWaddr 00:40:63:C4:EB:36
           inet addr:192.168.0.9  Bcast:192.168.0.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11 Base address:0xdc00

> Running DRBD alone works, as I've mentioned. But one curious thing I've
> noticed is that running the init script "/etc/init.d/drbd start" (on this
> Gentoo Linux-based system) starts each disk in the secondary/secondary
> state. That is, it's necessary to subsequently run "drbdsetup /dev/drbd/0
> primary" because the init script does not ask which disk should be
> primary. As I understand it, this is abnormal, correct?

/etc/init.d/drbd start results in secondary/secondary. After this 
heartbeat does
   $DRBDADM primary $RES && break
in the script /etc/ha.d/resource.d/drbddisk start.

See here:
via1:# cat /proc/drbd
version: 0.7.10 (api:77/proto:74)
SVN Revision: 1743 build by phil at mescal, 2005-01-31 12:22:07
  0: cs:Connected st:Primary/Secondary ld:Consistent

And it should look in the logs like this:
heartbeat: 2005/03/12_01:26:18 info: standby: acquire [foreign] 
resources from via2
heartbeat: 2005/03/12_01:26:18 info: acquire local HA resources (standby).
heartbeat: 2005/03/12_01:26:18 info: Acquiring resource group: via1 
192.168.0.9drbddisk::drbd-web Filesystem::/dev/drbd0::/ha::ext3 apache2
heartbeat: 2005/03/12_01:26:18 info: Running /etc/ha.d/resource.d/IPaddr 
192.168.0.9 start
heartbeat: 2005/03/12_01:26:18 info: /sbin/ifconfig eth0:0 192.168.0.9 
netmask 255.255.255.0    broadcast 192.168.0.255
heartbeat: 2005/03/12_01:26:18 info: Sending Gratuitous Arp for 
192.168.0.9 on eth0:0 [eth0]
heartbeat: 2005/03/12_01:26:18 /usr/lib/heartbeat/send_arp -i 1010 -r 5 
-p /var/lib/heartbeat/rsctmp/send_arp/send_arp-192.168.0.9 eth0 
192.168.0.9 auto 192.168.0.9 ffffffffffff
heartbeat: 2005/03/12_01:26:19 info: Running 
/etc/ha.d/resource.d/drbddisk drbd-web start
heartbeat: 2005/03/12_01:26:19 info: Running 
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /ha ext3 start
heartbeat: 2005/03/12_01:26:20 info: Running 
/etc/ha.d/resource.d/apache2  start
heartbeat: 2005/03/12_01:26:22 info: local HA resource acquisition 
completed (standby).
heartbeat: 2005/03/12_01:26:22 info: Standby resource acquisition done 
[foreign].
heartbeat: 2005/03/12_01:26:22 info: Initial resource acquisition 
complete (auto_failback)
heartbeat: 2005/03/12_01:26:22 info: remote resource transition completed.

> Notwithstanding the DRBD situation, the IP address comes first in the
> haresources config and this resource is not being activated, so I'm not
> sure whether DRBD is really the issue. At least not yet.

If IP comes first, and there are problems with the IP, DRBD will not be 
switched to primary.

You should do the configuration step by step.
- set up DRBD manually, independant from heartbeat (you always did)
- set up samba on top of DRBD, keep it starting from init.d directly
- set up only the IP as haresource, test it
- then add drbd as haresource
- then test your /etc/ha.d/resource.d/samba script _manually_
- then add samba as resource

Helmut Wollmersdorfer



More information about the Linux-HA mailing list