Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi Everyone,
I've found this drbddisk modification that will block takeover when
the local resource is not in a safe state, however it only works if
you only have one resource, but since I have two resources namely r0
and r1, it would not work.
case "$CMD" in
start)
# forbid to become primary if ressource is not clean
DRBDSTATEOK=`cat /proc/drbd | grep ' cs:Connected ' | grep '
ds:UpToDate/' | wc -l`
if [ $DRBDSTATEOK -ne 1 ]; then
echo >&2 "drbd is not in Connected/UpToDate state. refusing to
start resource"
exit 1
fi
I would be truly grateful if anyone could care to show how to effect
said modification.
I'm trying to prevent a Split Brain scenario here, and I'm still
testing my setup; I was in a predicament earlier wherein one of the
resource r1 is in healthy state and r0 is in standalone
Primary/Unknown state, I had to issue drdbadm -- --discard-my-data r0
to resolve the split brain.
Many thanks!
Jan