[DRBD-user] Starting up in degraded mode

drbd at bobich.net drbd at bobich.net
Sat Feb 9 19:22:56 CET 2008

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


On Sat, 9 Feb 2008, अनुज Anuj Singh wrote:

>>>> 3) Is there a sane way to handle the condition where both nodes come up
>>>> individually and only then the connection is restored? Obviously, the
>>>> disks would not be consistent, but they would both be working by that
>>>> point. Resyncing the BD underneath GFS would probably trash whichever
>>>> node's data is being overwritten. Is there a method available to
>>>> prevent this split-brain condition? One option I can see is to not
>>>> sync. GFS would try to mount, notice the other node up but not using
>>>> it's journal, and cluster would end up fencing one node. It'd be a race
>>>> on which one gets fenced, but that isn't a huge problem.
>>>>
>             after-sb-0pri discard-younger-primary;
>             after-sb-1pri discard-secondary;
>             after-sb-2pri call-pri-lost-after-sb;
>
> ^^This will handle the split brain, e.g. which node.
> go threw man pages.
>
>>
>> I did, but I am still having a problem. When I only have 1 node up and
>> running, it always comes up with Secondary/Unknown. If I bring it up with:
>> drbdadm -- --overwrite-data-of-peer primary all
>> it switches to Primary/Unknown and I can use it. But when I reboot, it
>> again comes up with Secondary/Unknown. Is there a way to make it come up
>> as Primary when the other node is "Unknown" (inaccessible)?
>
> Check the firewall settings on both the nodes , if both the nodes are
> communicating which other or not.

You're misunderstanding - at the moment I only have 1 node set up. I want 
the one node to come up as primary even of the other is uncontactable.

> see /var/log/messages while you do drbd service start/stop or doing
> drbdadm -- --overwrite-data-of-peer primary all
> if still error send log.

As I said, doing:
drbdadm -- --overwrite-data-of-peer primary all
makes it work, because it makes the local drbd Primary.
I can wrap it up in a script that checks the drbd1 for Secondary/Unknown 
and issue the above command to forcefully promote it, but I was hoping 
there is a way to do this automagically via the configuration.

Since
after-sb-2pri call-pri-lost-after-sb;
will make one of the nodes panic and stop anyway, if it only appears after 
startup, then it arguably might as well make itself primary if the other 
node is in "Unknown" state.

Gordan


More information about the drbd-user mailing list