[DRBD-user] "drbddisk status resource-name" always returns 0. Is it good for Heartbeat?

Igor Yu. Zhbanov bsg at uniyar.ac.ru
Sat Nov 25 15:06:40 CET 2006

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


Hello!

I use drbd-0.7.21. And I have written simple resource monitoring script which
reads Heartbeat resources list (/etc/ha.d/haresources) and for each resource
invokes its init-script with "status" argument. But my script whows that
drbddisk is always running. I have looked at it and found this:
...
case "$CMD" in
...
    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
	;;
...
So, the exit status from drbddisk is always 0. I think that it is not good for
resource managers because they didn't know whether resource actually running
or not.

What do you think?

Thanks.




More information about the drbd-user mailing list