[DRBD-user] drbd startup Pri/Sec Problem

Lars Ellenberg Lars.Ellenberg at linbit.com
Mon Apr 26 10:37:27 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.


/ 2004-04-23 11:00:38 +0200
\ Robert Hahnraths:
> Hi,
> 
> When my two have Finished the Sync then drbd is in secondary mode on
> both nodes.
> 
> To change this i open a Terminal window on the Master node and type
> drbdsetup /dev/nb0 primary
> Now i can mount /dev/nb0 in read/Write mode.
> 
> Then I'll stop the drbd Service on the Master node and swith to the
> Slave node.
> Here now I want to mount /dev/nb0 but I can only do that in read only
> mode.
> 
> What am I doing wrong here.
> I hope that someone can help me with this
> Thanx

you need some sort of cluster manager.
you always need to first promote to Primary state the node you want to
use the data on. typically hearbeat will do this for you using the
"datadisk" (or with 0.7 the drbddisk) command.
as long as you don't want to automate this, you need to do it by hand,
either using the datadisk script, or using drbdsetup <device> primary
directly.

actually one should even not be able to mount a Secondary at all, but
this was difficult to implement with linux kernel 2.4, so we at least
prohibit write access. with linux 2.6 this was easier (bd_claim()), and
you can only mount when in primary state, which is as it should be.

	Lars Ellenberg



More information about the drbd-user mailing list