[DRBD-user] Data loss drbd in split-brain...

Digimer lists at alteeve.ca
Sat Aug 8 17:54:04 CEST 2015

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


On 07/08/15 02:09 PM, Fabio Gomes wrote:
> Recently I had a split-brain and all data created in last day
> disappeared on primary server, my servers are turned on at 6:00 am and
> turned off at 11:00 pm every day, what disappeared was only the data
> created in the last day before the split-brain, all other data still
> intact, the split-brain occurred at start up of the servers...

You can prevent this by using proper fencing/stonith. Without fencing,
split-brains are inevitable.

> I´m using Ubuntu 14.04 with drbd 8.4.3. Does anybody know what could 
> happened ?

Any number of things, usually a network problem.

> Why my data has dissapeared ?

During a split-brain, data is being changed on both nodes independently.
To recover, you have to choose a node to discard the changes on so that
it can connect and sync with the peer.

> my configs are:
> 
> 
> 
> global {
>         usage-count yes;
> }
> 
> common {
> 
>         protocol C;
> 
>         syncer {
>                 rate 100M;

Unless you have a 10 Gbps network, that is almost certainly way too
high. In DRBD 8.4, you don't need to set this, it will sort it out on
it's own based on current load.

>         }

If you have pacemaker setup, configure stonith, test it to make sure it
works, then add;

handlers {
	fence-peer "/path/to/crm-fence-peer.sh";
	after-resync-target "/path/to/crm-unfence-peer.sh";
}

> }
> 
> 
> resource drbd0 {
> 
>    startup {
>       become-primary-on srvnononas;
>       wfc-timeout 180;
>    }
> 
>    net {
>      cram-hmac-alg sha1;
>      shared-secret "senhadrbd";
>    }
> 
>    syncer {
>     verify-alg md5;
>    }
> 
>    on srvnononas {
>     device     /dev/drbd0;
>     disk       /dev/sdb2;
>     address    10.0.1.1:7788;
>     meta-disk  internal;
>   }
> 
>   on shadownas {
>     device    /dev/drbd0;
>     disk      /dev/sdb2;
>     address   10.0.1.2:7788;
>     meta-disk internal;
>   }
> }
> 
> 
> Thanks for the help,
> Fabio
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?



More information about the drbd-user mailing list