+ Responder ao Tópico



  1. #1
    fredaodepaula
    Visitante

    Padrão Isso não deve tá certo!

    Sempre antes de inicializar o heartbeat eu tenho que montar manualmente a partição espelhada pelo drbd: mount /dev/drbd0 ... ?

  2. #2

    Padrão Re: Isso não deve tá certo!

    Bem, eu acho que você pode utilizar o arquivo /etc/fstab pra isso. Ou fazer uso do automount.


    Abraços!



  3. #3
    fredaodepaula
    Visitante

    Padrão Re: Isso não deve tá certo!

    No meu fstab tá desse jeito:

    /dev/drbd0 /mnt/dados ext3 defaults,noauto 0 0

    E não tá montando de maneira nenhuma.

  4. #4

    Padrão Re: Isso não deve tá certo!

    Bom vc configurou o haresourses do heartbeat para montar o drbd0?

    Seu haresources tem q esta +/- desta maneira aki:
    dominou.servidorIPaddr::192.168.XXX.XXX drbddisk Filesystem::/dev/drbd0::/ponto_de_montagem::ext3

    Esta maneira e utilizada na versão superior do heartbeat 2.0

    Espero ter ajudado.
    Qualquer coisa tamos ai.



  5. #5
    fredaodepaula
    Visitante

    Padrão Re: Isso não deve tá certo!

    Eu já fiz isso mas na hora de iniciar o heartbeat diz que drbd0 não pode ser montado.

    heartbeat: 2006/05/31_14:55:31 info: Configuration validated. Starting heartbeat 1.2.4
    heartbeat: 2006/05/31_14:55:31 info: heartbeat: version 1.2.4
    heartbeat: 2006/05/31_14:55:31 info: Heartbeat generation: 129
    heartbeat: 2006/05/31_14:55:31 info: UDP multicast heartbeat started for group 2 25.0.0.0 port 694 interface eth0:0 (ttl=1 loop=0)
    heartbeat: 2006/05/31_14:55:31 info: pid 18146 locked in memory.
    heartbeat: 2006/05/31_14:55:31 info: Local status now set to: 'up'
    heartbeat: 2006/05/31_14:55:32 info: pid 18149 locked in memory.
    heartbeat: 2006/05/31_14:55:32 info: pid 18150 locked in memory.
    heartbeat: 2006/05/31_14:55:32 info: pid 18151 locked in memory.
    heartbeat: 2006/05/31_14:57:31 WARN: node debian-cdtc: is dead
    heartbeat: 2006/05/31_14:57:31 info: Local status now set to: 'active'
    heartbeat: 2006/05/31_14:57:31 WARN: No STONITH device configured.
    heartbeat: 2006/05/31_14:57:31 WARN: Shared disks are not protected.
    heartbeat: 2006/05/31_14:57:31 info: Resources being acquired from debian-cdtc.
    heartbeat: 2006/05/31_14:57:31 info: Running /etc/ha.d/rc.d/status status
    heartbeat: 2006/05/31_14:57:31 info: /usr/lib/heartbeat/mach_down: nice_failback : foreign resources acquired
    heartbeat: 2006/05/31_14:57:31 info: mach_down takeover complete.
    heartbeat: 2006/05/31_14:57:31 info: Initial resource acquisition complete (mach _down)
    heartbeat: 2006/05/31_14:57:31 info: mach_down takeover complete for node debian -cdtc.
    heartbeat: 2006/05/31_14:57:31 info: Local Resource acquisition completed.
    heartbeat: 2006/05/31_14:57:31 info: Running /etc/ha.d/rc.d/ip-request-resp ip-r equest-resp
    heartbeat: 2006/05/31_14:57:31 received ip-request-resp IPaddr::10.0.0.100 OK ye s
    heartbeat: 2006/05/31_14:57:31 info: Acquiring resource group: debian1 IPaddr::1 0.0.0.100 drbddisk Filesystem::/dev/drbd0::/mnt/dados::ext3 apache2
    heartbeat: 2006/05/31_14:57:31 info: Running /etc/ha.d/resource.d/IPaddr 10.0.0. 100 start
    heartbeat: 2006/05/31_14:57:32 info: /sbin/ifconfig eth0:1 10.0.0.100 netmask 25 5.255.255.0 broadcast 10.0.0.255
    heartbeat: 2006/05/31_14:57:32 info: Sending Gratuitous Arp for 10.0.0.100 on et h0:1 [eth0]
    heartbeat: 2006/05/31_14:57:32 /usr/lib/heartbeat/send_arp -i 1010 -r 5 -p /var/ lib/heartbeat/rsctmp/send_arp/send_arp-10.0.0.100 eth0 10.0.0.100 auto 10.0.0.10 0 ffffffffffff
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/ha.d/resource.d/drbddisk star t
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/ha.d/resource.d/Filesystem /de v/drbd0 /mnt/dados ext3 start
    heartbeat: 2006/05/31_14:57:32 ERROR: Couldn't mount filesystem /dev/drbd0 on /m nt/dados
    heartbeat: 2006/05/31_14:57:32 ERROR: Return code 1 from /etc/ha.d/resource.d/Fi lesystem
    heartbeat: 2006/05/31_14:57:32 CRIT: Giving up resources due to failure of Files ystem::/dev/drbd0::/mnt/dados::ext3
    heartbeat: 2006/05/31_14:57:32 info: Releasing resource group: debian1 IPaddr::1 0.0.0.100 drbddisk Filesystem::/dev/drbd0::/mnt/dados::ext3 apache2
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/init.d/apache2 stop
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/ha.d/resource.d/Filesystem /de v/drbd0 /mnt/dados ext3 stop
    heartbeat: 2006/05/31_14:57:32 WARNING: Filesystem /mnt/dados not mounted?
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/ha.d/resource.d/drbddisk stop
    heartbeat: 2006/05/31_14:57:32 info: Running /etc/ha.d/resource.d/IPaddr 10.0.0. 100 stop
    heartbeat: 2006/05/31_14:57:32 info: /sbin/route -n del -host 10.0.0.100
    heartbeat: 2006/05/31_14:57:32 info: /sbin/ifconfig eth0:1 down
    heartbeat: 2006/05/31_14:57:32 info: IP Address 10.0.0.100 released
    heartbeat: 2006/05/31_14:57:43 info: Local Resource acquisition completed. (none )
    heartbeat: 2006/05/31_14:57:43 info: local resource transition completed.

  6. #6

    Padrão Re: Isso não deve tá certo!

    Vc tem o script ai do drbdisk dentro do do resourses?



  7. #7
    fredaodepaula
    Visitante

    Padrão Re: Isso não deve tá certo!

    Olha o meu drbddisk ai


    DEFAULTFILE="/etc/default/drbd"
    DRBDADM="/sbin/drbdadm"

    if [ -f $DEFAULTFILE ]; then
    . $DEFAULTFILE
    fi

    if [ "$#" -eq 2 ]; then
    RES="$1"
    CMD="$2"
    else
    RES="all"
    CMD="$1"
    fi

    case "$CMD" in
    start)
    # try several times, in case heartbeat deadtime
    # was smaller than drbd ping time
    try=6
    while true; do
    $DRBDADM primary $RES && break
    let "--try" || exit 20
    sleep 1
    done
    ;;
    stop)
    # exec, so the exit code of drbdadm propagates
    exec $DRBDADM secondary $RES
    ;;
    status)
    if [ "$RES" = "all" ]; then
    echo "A resource name is required for status inquiries."
    exit 10
    fi
    ST=$( $DRBDADM state $RES 2>&1 )
    STATE=${ST%/*}
    if [ "$STATE" = "Primary" ]; then
    echo "running"
    elif [ "$STATE" = "Secondary" ]; then
    echo "stopped"
    else
    echo "$ST"
    fi
    ;;
    *)
    echo "Usage: drbddisk [resource] {start|stop|status}"
    exit 1
    ;;
    esac

    exit 0