[DRBD-user] Synced or not?

Mike Lovell mike at dev-zero.net
Thu Mar 18 02:59:40 CET 2010

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


Cameron Smith wrote:
> Still a little fuzzy about where my data can go in relation to drbd.
>
> My lower level is:
> /dev/sda2 /data
>
> my drbd device is:
> /dev/drbd1
>
> The docs say not to access the lower level device after drbd is 
> running so where do I put my files and data?
> If it's actually on the drbd1 device how to I access that? I cannot 
> mount it like a partition using mount.
>
> My config still looks like:
>
> global {
>   usage-count yes;
> }
> common {
>   protocol C;
> }
> resource r0 {
>   on clst01.example.net <http://clst01.example.net/> {
>     device    /dev/drbd1;
>     disk      /dev/sda2;
>     address   10.233.2.71:7789 <http://10.233.2.71:7789/>;
>     meta-disk /dev/sda6[0];
>   }
>   on clst02.example.net <http://clst02.example.net/> {
>     device    /dev/drbd1;
>     disk      /dev/sda2;
>     address   10.233.2.72:7789 <http://10.233.2.72:7789/>;
>     meta-disk /dev/sda6[0];
>   }
> }
>
>
drbd only allows nodes that are "primary" for a resource to access, and 
mount, the block device presented by drbd (in your case, /dev/drbd1). in 
the default "primary/secondary" mode, there is only one primary which 
can access the device then mount it. to use the device on the secondary, 
you must promote it the the primary (which will also demote the current 
primary) and then mount the filesystem. this can be handled by linux-ha 
or pacemaker automatically for you. you can't mount it on both servers 
at once. and mounting the underlying block device on the secondary can 
cause data corruption since you essentially have a block device mounted 
twice.

you can get around this by using "primary/primary" mode but will require 
significant changes to your system. you will have to use a clustered 
filesystem, such as GFS or OCFS, for your /data/ mount point. this 
introduces its own can of worms but is possible.

drbd does not magically make it so that any filesystem can magically 
become clustered and redundant and it wont be able to since it has no 
concept of a filesystem. from a high level, it just replicates writes 
between block devices on two servers.

hope that helps clarify things a little more for you.

mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100317/28598e7b/attachment.htm>


More information about the drbd-user mailing list