[DRBD-user] heartbeat+nfs-server

Bernd Broermann bernd at broermann.com
Sat Jun 5 17:54:20 CEST 2004

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


Bernd Broermann wrote:
> Lars Ellenberg wrote:
> 
>> / 2004-06-04 01:18:57 +0200
>> \ Bernd Broermann:
>>
>>> Hallo ,
>>>
>>> I want correctly set up a HA-DRBD cluster , which serve data via nfs.
>>>
>>> I am using
>>> drbd 0.6.12-1
>>> heartbeat  1.0.4-1.woody.um.1
>>> nfs-kernel-server      1.0-2woody1
>>> on a 2.4.24 kernel based debian woody .
>>>
>>> All is working so far.
>>> When I gracefully stop Node1(master) with /etc/init.d/heartbeat stop 
>>> , Node2 ( slave ) is taking over, becomes primary and the nfs share 
>>> is still available.
>>> Even when Node1 comes back, all is  working.
>>>
>>> When I poweroff Node1, Node2 is taking over as I want as well.
>>> But when Node1 comes back , heartbeat starts SyncAll from Node2 to 
>>> Node1 and stops NFS without waiting for for finishing the sync. Node1 
>>> starts nfs while secondary.
>>>
>>> One have to wait all the SyncAll time until can access the cluster.
>>>
>>> In my  /etc/ha.d/haresources there is on both nodes.
>>> node1  192.168.96.65 datadisk::drbd0 nfs-kernel-server
>>>
>>> How can I tell heartbeat to wait with shutting down the nfs-server on 
>>> Node2 ( Wait to start the nfs server on Node1 ) ?
>>
>>
>>
>> this is one of the situations where drbd 0.6 is "misbehaving" ...
> 
> 
> Do you suggest to use drbd 0.7 insted ?
> 
>>
>> don't start heartbeat while drbd is resynching.
>> if you have proper order of start scripts, and proper settings in
>> drbd.conf (inittimeout=-0, NO skip-wait), and start drbd before you
>> start heartbeat, the drbd init script will "block" the boot process
>> until drbd has finished the resychronization. then heartbeat is started,
>> and can make its decision.
>>
>>  or/and:
>> tell heartbeat to *not* automatically relocate
>> the services back to their "prefered" node.
>> see the heartbeat config option auto_failback resp. nice_failback. 
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 
I watched now the both nodes with the script

watch -n1 ./hastatus.sh
cat /proc/drbd
if ifconfig eth0:0 | grep inet 1>/dev/null ; then echo "eth0:0 is up";fi
if ps ax |grep nfs[d] 1>/dev/null; then echo "NFSD running";fi
mount | grep nb0

and i recognized  that the nfs-kernel-server script did not stop the 
nfsd processes correctly.
I put
if  ps ax | grep nfs[d] 1>/dev/null ; then killall -9 nfsd ;fi
at the end of the stop section of the nfs-kernel-server service script 
and now it seems to work:-).

thank you very much.
bernd





More information about the drbd-user mailing list