[DRBD-user] DRBD / OCFS2 + MC

Robert Schumann schumann at informatik.hu-berlin.de
Wed May 18 10:51:27 CEST 2011

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Rasto,

Am 17.05.2011 10:29, schrieb Rasto Levrinc:
> On Mon, May 16, 2011 10:31 pm, Robert Schumann wrote:
>> for weeks I'm trying to setup a DRBD/OCFS2 cfs on two nodes. I'm always
>> facing problems (either wrong cluster fs stack, or different configuration
>> in drbd-mc, or ... ). Unfortunately it seems, that at least the order and
>> colocation commands from
>>
>> http://www.drbd.org/users-guide/s-ocfs2-pacemaker.html#s-ocfs2-pacemaker-
>> constraints
>>
>> doesn't work either - is there an "inf: " missing?
> 
> Are you saying that documentation should be always uptodate? :)

Of course not, that's by all means unnecessary - it would completely
unveil the myth of such great nerd tools ;-)

>>
>> One of the biggest problems I have in the drbd-mc is, that when I add
>> linbit:drbd resource, and a group for controld/o2cb (for concurrent
>> access, btw. some of the resource agents are also mentioned in the wrong
>> class), then afterwards I cannot "only" add a filesystem with ocfs2 - the
>> mc is always adding a complete new linbit:drbd, although it is already
>> there and it completely ignores the controld/o2cb stuff.
> 
> As for DRBD:MC the plan was that if you choose Filesystem as opposed to
> Filesystem + DRBD, the DRBD resource would not be created. Well it was
> forgotten, but should be easy enough to fix. There are couple of
> workarounds for that, one is to enter the block device like
> "/dev/drbd/by-res/ocfs2" in the block device field instead of choosing the
> DRBD resource.

Alright I tried that and I believe that it works, too... but finally I
ended up using crm configure to setup primitives/clones like this

- --8<--
primitive cfs0 ocf:heartbeat:Filesystem \
        params device="/dev/drbd0" directory="/cfs0" fstype="ocfs2" \
        op monitor interval="120s"
primitive dlm0 ocf:pacemaker:controld \
        op monitor interval="120s"
primitive drbd0 ocf:linbit:drbd \
        params drbd_resource="drbd0" \
        operations $id="drbd0-operations" \
        op monitor interval="20s" role="Master" timeout="20s" \
        op monitor interval="30s" role="Slave" timeout="20s" \
        meta target-role="started"
primitive o2cb0 ocf:pacemaker:o2cb \
        op monitor interval="120s"
ms drbd0-dual-master drbd0 \
        meta resource-stickiness="100" master-max="2" interleave="true"
notify="true"
clone cfs0-clone cfs0 \
        meta interleave="true" ordered="true"
clone dlm0-clone dlm0 \
        meta globally-unique="false" interleave="true"
clone o2cb0-clone o2cb0 \
        meta globally-unique="false" interleave="true"
colocation cfs0-o2cb0 inf: cfs0-clone o2cb0-clone
colocation dlm0-on-drbd0 inf: dlm0-clone drbd0-dual-master:Master
colocation o2cb0-dlm0 inf: o2cb0-clone dlm0-clone
order dlm0-o2cb0 0: dlm0-clone o2cb0-clone
order drbd0-with-dlm0 0: drbd0-dual-master:promote dlm0-clone
order o2cb0-cfs0 0: o2cb0-clone cfs0-clone
- --8<--

with a drbd0.res file:
- --8<--
        startup {
                become-primary-on       both;
        }

        net {
                allow-two-primaries;
                after-sb-0pri   discard-zero-changes;
                after-sb-1pri   discard-secondary;
        }
- --8<--


and it's working after a nasty fsck.ocfs2, which reset the ocfs stack.
Could someone tell if the timeouts are reasonable as I got for almost
every entry warnings IIRC? I suppose the order and colocation commands
can even be simplified?

>>
>> Does the mc lack support of real ocfs2 handling with controld/o2cb?
>>
> 
> I was thinking about some kind of shortcuts for this, but at the moment it
> is not the most popular configuration. It should be possible to enter it,
> though.

That would be nice :). Am I right in the assumption that the option
Filesystem + DRBD does not serve a (Cluster) Filesystem, which can be
written to by any node simultaneously? E.g. I read some tutorials, which
use a plain ext4 (or an Cluster FS but without locking manager) for the
drbd device, but that could lead to strange problems, when all nodes try
to write to the same file doesn't it?

Best regards
Robert


- -- 

|-----------------------------------------------------address-+
| work:   jacob-und-wilhelm-grimm-zentrum
|         geschwister-scholl-str. 1, 10117 berlin
| postal: humboldt-universität zu berlin
|         computer- und medienservice
|         unter den linden 6
|         10099 berlin
|-----------------------------------------------------contact-+
| mail:   schumann at informatik.hu-berlin.de
| icq:    93163687
| xmpp:   betulichergutmensch at googlemail.com
| huchat: schumanr at chat.hu-berlin.de
| phone:  +49(0)30-2093-70133
|-----------------------------------------------------gpg/pgp-+
| key:    remembrance.de/gpg/0xA5A5FAA2.asc
| fprint: 9220-9732-7390-7A0C-5623-3336-4233-FDF8-A5A5-FAA2
|-------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3TiI8ACgkQQjP9+KWl+qKKtACglhhcTPFEJupLHSPwgVLLdL0i
nb4AoIA889mW63YNqqq0+x8YKKa7kh5C
=nELy
-----END PGP SIGNATURE-----



More information about the drbd-user mailing list