[DRBD-user] DRBD in rw and ro modes.

Praveen P praveenzx at gmail.com
Wed Feb 4 14:48:59 CET 2009

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


Hello,
I am Praveen, a perl programmer from India.

Currently I am working on a perl project which requires DRBD .  I had gone
though the documentation and many other blogs and finally I was able to
configure it on my test servers.

Now my client have another requirement, the drbd device on primary should be
in read/write mode and the secondary should be in read-only mode.
I tried to mount the drbd device on the secondary machine in our network and
was unable to do the same as the block device's file system couldn't be
determined on the secondary. Below is the error which came up.

# mount /dev/drbd0 /db
mount: block device /dev/drbd0 is write-protected, mounting read-only
mount: Wrong medium type

On primary

# mount /dev/drbd0 /db
#
On further researching about drbd, i found the below 2 modes in which drbd
could be configured.

Single-primary mode

In single-primary mode, any resource is, at any given time, in the primary
role on only one cluster member. Since it is thus guaranteed that only one
cluster node manipulates the data at any moment, this mode can be used with
any conventional file system (ext3, ext4, XFS etc.).

Deploying DRBD in single-primary mode is the canonical approach for high
availability (fail-over capable) clusters.

Dual-primary mode

This feature is available in DRBD 8.0 and later.

In dual-primary mode, any resource is, at any given time, in the primary
role on both cluster nodes. Since concurrent access to the data is thus
possible, this mode requires the use of a shared cluster file system that
utilizes a distributed lock manager. Examples include GFS and OCFS2.

Deploying DRBD in dual-primary mode is the preferred approach for
load-balancing clusters which require concurrent data access from two nodes.
This mode is disabled by default, and must be enabled explicitly in DRBD's
configuration file.


I had communicated this finding with my client, but the client want this to
be done in Single-primary mode. Could anyone guide me on how this could be
accomplished.

Also I have another doubt. I have servers a, b, c and d. Can I club LVM
devices on all 4 server to make a drbd resource ? I don't have the resource
to test this practically. This is another advanced required of the client,
which needs to be implemented after the first module is completed. If it is
possible do I simply add the the servers to the resource and one server will
act as primary and all others as secondary ?
Waiting for the valuable guidance.

-- 
#####################
#          Praveen~          #
#     +919895066033     #
#####################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090204/4fa22b19/attachment.htm>


More information about the drbd-user mailing list