[DRBD-user] yes you can mount the secondary read-only (bug reports)

Philipp Reisner philipp.reisner at linbit.com
Tue Jan 4 17:37:28 CET 2005

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

Am Dienstag, 4. Januar 2005 15:55 schrieb Dave Dykstra:
> The FAQ says that DRBD does not allow mounting the secondary, but I found
> a way to do it.  If I start up DRBD on two nodes, make one primary but
> not mount it there, then attempt to mount the secondary side it gets
> mounted read-only.  Then I can mount the primary read-write.  This may
> be considered a feature by some but I consider it a bug.  I accidentally
> got into this situation by a misunderstanding of the parameter to the
> heartbeat 'drbddisk' script when I configured heartbeat for the first
> time and passed 'drbd0' to the script as an example showed rather than the
> name I had chosen for my resource.  As a result, the primary & secondary
> sides didn't get swapped, but heartbeat unmounted the primary side and
> mounted the secondary.

Unfortunately it is not possible to prohibit mounting it on the
secondary under Linux-2.4.x

If you would retry on a Linux-2.6.x kernel, you will notice that 
it fails on 2.6 .

> Secondary bug report: it took me a long time to figure out because I
> saw no error messages anywhere from drbddisk; the only effect was that
> the filesystem was mounted read-only.  It turns out that there were no
> error messages because the error codes from "$DRBDADM primary $RES" and
> "$DRBDADM secondary $RES" in /etc/ha.d/resource.d/drbddisk are ignored.
> If I put a "set -e" before each of those two commands, heartbeat notices
> the error code and refuses to do the switch when I request a voluntary
> hb_standby failover.  I report this to the drbd mailing list because at
> least on Debian the drbddisk script is part of one of the drbd packages,
> not the heartbeat package.

Right... this is probabely a bug...

> Here's more details in case it matters.  The two machines are newly
> purchased running a recent Debian testing with packages
> drbd0.7-module-source & drbd0.7-utils version 0.7.5-2 and a custom kernel
> based on 2.4.26.  

I will look into this...

: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :

More information about the drbd-user mailing list