[DRBD-user] drbd 8.0.4 and heatbeat 2.0.7

cosmih cosmih at gmail.com
Tue Jul 3 17:13:10 CEST 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


hi,

i have two machine with gentoo installed with heartbeat 2.0.7, drbd 8.0.4and mon

this setup is made for having a failover environment for a web application (
apache2.2 + php + mysql)

when mon stop the heartbeat or when i stop the heartbeat the machine is
restarted because the drbd device cannot be setted in secondary mode

below are file config for heartbeat and for drbd

regards,
cosmih


/etc/ha.d/ha.cf
---------------------
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 3
deadtime 12
warntime 9
initdead 20
udpport 694
baud   38400
serial  /dev/ttyS0
auto_failback off
watchdog /dev/watchdog
node    host01 host02
ping gateway_ip
respawn cluster /usr/lib/heartbeat/ipfail
crm off
---------------------------

/etc/ha.d/haresources
-------------------------------
host02 ip1/27/eth1/broadcast ip2/27/eth1/broadcast ip3/27/eth1/broadcast
ip4/27/eth1/broadcast arpUpdate::ip1/ip2/ip3/ip4 drbddisk::mirror sleep5
Filesystem::/dev/drbd0::/mirror::reiserfs mountFORftp mysql apache2 fcron
mon sshd_ip1
------------------------------------
where arpUpdate,sleep5,mountFORftp and sshd_ip are some script made by me
... and this script works verry well

/etc/drbd.conf
--------------------
global {
    usage-count no;
}
common {
  syncer { rate 70M; }
}
resource mirror {
  protocol C;
  handlers {
    pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f";
    pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f";
    local-io-error "echo o > /proc/sysrq-trigger ; halt -f";
    outdate-peer "/usr/sbin/drbd-peer-outdater";
  }
  startup {
    wfc-timeout  12;
    degr-wfc-timeout 120;    # 2 minutes.
  }
  disk {
    on-io-error   detach;
  }
  net {
    cram-hmac-alg "md5";
    shared-secret "somepass";
    after-sb-0pri discard-younger-primary;
    after-sb-1pri consensus;
    after-sb-2pri disconnect;
    rr-conflict disconnect;
  }
  syncer {
    rate 70M;
    al-extents 257;
  }
  on host01 {
    device     /dev/drbd0;
    disk       /dev/sda7;
    address    10.0.0.1:7788;
    meta-disk  /dev/sda8[0];
  }
  on host02 {
    device    /dev/drbd0;
    disk      /dev/sda7;
    address   10.0.0.2:7788 ;
    meta-disk /dev/sda8[0];
  }
}


here is the ha-debug log (the real IP was replaced)
-------------------------------------
heartbeat[6522]: 2007/07/03_11:35:54 info: Heartbeat shutdown in progress.
(6522)
heartbeat[10706]: 2007/07/03_11:35:54 info: Giving up all HA resources.
ResourceManager[10716]:    2007/07/03_11:35:54 info: Releasing resource
group: host02 ip1/27/eth1/gateway_ip ip2/27/eth1/gateway_ip
ip3/27/eth1/gateway_ip ip4/27/eth1/gateway_ip arpUpdate::ip1/ip2/ip3/ip4
drbddisk::mirror sleep5 Filesystem::/dev/drbd0::/mirror::reiserfs
mountFORftp mysql apache2 fcron mon sshd_ip1
ResourceManager[10716]:    2007/07/03_11:35:54 info: Running
/etc/ha.d/resource.d/sshd_ip1  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug: Starting
/etc/ha.d/resource.d/sshd_ip1  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug:
/etc/ha.d/resource.d/sshd_ip1  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:54 info: Running
/etc/ha.d/resource.d/mon  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug: Starting
/etc/ha.d/resource.d/mon  stop
  [32;01m* [0m Stopping mon ...
[A [72C  [34;01m[ [32;01mok [34;01m ] [0m
ResourceManager[10716]:    2007/07/03_11:35:54 debug:
/etc/ha.d/resource.d/mon  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:54 info: Running
/etc/ha.d/resource.d/fcron  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug: Starting
/etc/ha.d/resource.d/fcron  stop
Stopping fcron din heartbeat
11:35:54 reinstalling root's fcrontab
11:35:54 installing file /tmp/fcr-rCHC7Y for user root
Modifications will be taken into account right now.
ResourceManager[10716]:    2007/07/03_11:35:54 debug:
/etc/ha.d/resource.d/fcron  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:54 info: Running
/etc/ha.d/resource.d/apache2  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug: Starting
/etc/ha.d/resource.d/apache2  stop
  [33;01m* [0m WARNING:  apache2 has not yet been started.
ResourceManager[10716]:    2007/07/03_11:35:54 debug:
/etc/ha.d/resource.d/apache2  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:54 info: Running
/etc/ha.d/resource.d/mysql  stop
ResourceManager[10716]:    2007/07/03_11:35:54 debug: Starting
/etc/ha.d/resource.d/mysql  stop
  [32;01m* [0m Stopping mysql ...
  [32;01m* [0m Stopping mysqld (0)
[A [72C  [34;01m[ [32;01mok [34;01m ] [0m
ResourceManager[10716]:    2007/07/03_11:35:57 debug:
/etc/ha.d/resource.d/mysql  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:57 info: Running
/etc/ha.d/resource.d/mountFORftp  stop
ResourceManager[10716]:    2007/07/03_11:35:57 debug: Starting
/etc/ha.d/resource.d/mountFORftp  stop
Unmounting /home/tony/website & /home/black/website
ResourceManager[10716]:    2007/07/03_11:35:57 debug:
/etc/ha.d/resource.d/mountFORftp  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:57 info: Running
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /mirror reiserfs stop
ResourceManager[10716]:    2007/07/03_11:35:57 debug: Starting
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /mirror reiserfs stop
Filesystem[11147]:    2007/07/03_11:35:57 INFO: Running stop for /dev/drbd0
on /mirror
Filesystem[11147]:    2007/07/03_11:35:57 INFO: Trying to unmount /mirror
Filesystem[11147]:    2007/07/03_11:35:57 INFO: unmounted /mirror
successfully
Filesystem[11083]:    2007/07/03_11:35:57 INFO: Filesystem Success
INFO: Filesystem Success
ResourceManager[10716]:    2007/07/03_11:35:57 debug:
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /mirror reiserfs stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:35:57 info: Running
/etc/ha.d/resource.d/sleep5  stop
ResourceManager[10716]:    2007/07/03_11:35:57 debug: Starting
/etc/ha.d/resource.d/sleep5  stop

ResourceManager[10716]:    2007/07/03_11:36:02 debug:
/etc/ha.d/resource.d/sleep5  stop done. RC=0
ResourceManager[10716]:    2007/07/03_11:36:02 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:02 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:02 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:02 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:03 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:03 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:03 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:03 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:03 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:04 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:04 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:04 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:04 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:04 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:05 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:05 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:05 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:05 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:05 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:06 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:06 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:06 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:06 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:06 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:07 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:07 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:07 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:07 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:07 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:08 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:08 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:08 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:08 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:08 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:09 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:09 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:09 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:09 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:09 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:10 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:10 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:10 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:10 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:10 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:11 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:11 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:11 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:11 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:11 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:12 info: Retrying failed stop
operation [drbddisk::mirror]
ResourceManager[10716]:    2007/07/03_11:36:12 info: Running
/etc/ha.d/resource.d/drbddisk mirror stop
ResourceManager[10716]:    2007/07/03_11:36:12 debug: Starting
/etc/ha.d/resource.d/drbddisk mirror stop
State change failed: (-12) Device is held open by someone
Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11
ResourceManager[10716]:    2007/07/03_11:36:13 debug:
/etc/ha.d/resource.d/drbddisk mirror stop done. RC=11
ResourceManager[10716]:    2007/07/03_11:36:13 ERROR: Return code 11 from
/etc/ha.d/resource.d/drbddisk
ResourceManager[10716]:    2007/07/03_11:36:13 CRIT: Resource STOP failure.
Reboot required!
ResourceManager[10716]:    2007/07/03_11:36:13 CRIT: Killing heartbeat
ungracefully!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20070703/e084f92f/attachment.htm>


More information about the drbd-user mailing list