drbd-user March 2010 archive
Main Archive Page > Month Archives  > drbd-user archives
drbd-user: Re: [DRBD-user] Help with config

Re: [DRBD-user] Help with config

From: Mike Lovell <mike_at_nospam>
Date: Mon Mar 15 2010 - 17:53:38 GMT
To: drbd-user@lists.linbit.com

Cameron Smith wrote:
> On Sun, Mar 14, 2010 at 6:59 PM, Cameron Smith <velvetpixel@gmail.com
> <mailto:velvetpixel@gmail.com>> wrote:
> The partition I want drbd to match to secondary is / and it is
> at /dev/sda2.
> Is this the correct syntax?
> resource r0 {
> on clst01 {
> device /;
> disk /dev/sda2;
> address <>;
> meta-disk internal;
> }
> on clst02 {
> device /;
> disk /dev/sda2;
> address <>;
> meta-disk internal;
> }
> Also how do I reference the external location if I am using a
> separate partition for drbd meta data?
> OK That must be wrong as I get:
> " drbdadm create-md r0
> / is not a block device!
> Command 'drbdmeta / v08 /dev/sda2 internal create-md' terminated with
> exit code 20
> drbdadm aborting"
> How do I set root partition to be the source of the resource?

first off, its seems like you could use reading through the
documentation on drbd online. drbd replicates block devices and not
filesystems. / is a filesystem. the device option that you have wrong in
drbd.conf is documented online.

the device option is the name of a drbd device to use for the particular
drbd resource you are trying to set up. something /dev/drbd0. not just /
which is the root of your filesystem. if this is the only drbd resource
on your box, then using /dev/drbd0 for that option will work.

finally, trying to run the root of your filesystem on drbd sounds like
it would be a giant pain for multiple reasons. first off, in drbd's
default running mode, only one of the two nodes can use the resource at
a time. so only the primary box would be able to mount /. the second
system would have to be waiting to mount / which would also mean that
drbd probably isn't running and is therefore behind and not usable. it
might be possible to build this in to the initrd/initramfs but that has
been frowned upon by the list before. the other option for this would be
to use primary/primary mode in drbd and use a clustered filesystem for
/. this creates even more headache because you then have to deal with
something like GFS or OCFS for your root filesystem. in addition, doing
/ on drbd would mean that the two servers would get identical /etc/ and
configuration files. although servers have almost identical
configuration, they rarely are completely identical. stuff like network
configuration or hostname is not always going to be identical. your
distro or configuration might be able to get around it but it will be

so the gist of it is, don't try to do / on a drbd device. create some
mount point that is backed by drbd and is moved between the two servers.
and please go read the documentation.


drbd-user mailing list