[DRBD-user] Problem mounting drbd0 at boot

Brian Camp fecoughndie at gmail.com
Tue Apr 20 01:19:44 CEST 2010

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


Hello, group.  I'm having some trouble getting /dev/drbd0 to mount on /opt
at boot.  I can do it manually without any problems at all.  When the
machine boots, /dev/md0 is being mounted instead.  I have to perform the
following commands to mount drbd0:

*umount /opt
drbdadm primary r0
drbdadm attach r0
mount /dev/drbd0*

Everything is then mounted, and node1 is the primary node as it should be.
Here is the output from /proc/drbd after performing the above commands.

version: 8.3.3 (api:88/proto:86-91)
GIT-hash: 49bfeeaf3690ad0b9afd5376feda9e9eb34a30f3 build by nobody at mail1,
2010-04-19 07:49:28
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r----
    ns:4 nr:0 dw:4 dr:1585 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0

Drbd0 is being put on top of a raid array /dev/md0.  I have followed the
documentation located at drbd.org to do my initial set up.  I have created
an ext3 filesystem on /dev/drbd0, which gave me a new UUID.  Here is a copy
of my fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/md1 during installation
UUID=96473328-7530-48c1-a9c2-d7f3451eef8f /               ext3
errors=remount-ro $
# /opt was on /dev/md0 during installation
UUID=adbd7bce-e9a1-4929-9a5b-0722ec3d3f22 /opt            ext3
defaults        0 $
# swap was on /dev/sda5 during installation
UUID=2126f698-2450-454a-9ece-cf55f7828752 none            swap
sw              0 $
# swap was on /dev/sdb5 during installation
UUID=418f4404-d6db-4148-98bf-d6a7014248a3 none            swap
sw              0 $
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
#I hope this doesn't break everything
#/dev/drbd0 /opt ext3 rw 0 0

Note that the UUID being mounted on /opt is the new UUID that was issued
after creating the new filesystem on /dev/drbd0.  The comment about md0 was
generated at the time the OS was installed.  When I boot the machine with my
fstab like this, it still mounts md0 on /opt, instead of drbd0.  When I
comment out the UUID for the /opt mount and uncomment the bottom line
listing /dev/drbd0, the machine hangs at boot waiting for drbd0 to be
created.  The drbd process starts correctly when the system is booted.  I
have confirmed it starts correctly with lsmod|grep drbd as soon as I log
in.  What am I missing to correctly create the drbd device and mount it on
/opt at boot without the manual intervention?  I'm sure I'm doing something
to noob this whole thing up.  Here is my drbd.conf:

global {
  usage-count no;
}

common {
  protocol C;

  syncer {
    rate 150M;
    al-extents 1801;
  }

  startup {
    wfc-timeout  120;
    degr-wfc-timeout 15;
  }

  disk {

    on-io-error   detach;
    # fencing resource-and-stonith;
  }

  net {
    sndbuf-size 512k;
    timeout        60;   #  6 seconds  (unit = 0.1 seconds)
    connect-int    10;   # 10 seconds  (unit = 1 second)
    ping-int       10;   # 10 seconds  (unit = 1 second)
    ping-timeout   5;    # 500 ms (unit = 0.1 seconds)
    max-buffers    8000;
    max-epoch-size 8000;
    cram-hmac-alg  "sha1";
    shared-secret  "NotTheRealPassword";
    after-sb-0pri disconnect;

  }
}

resource r0 {
  device    /dev/drbd0;
  disk      /dev/md0;
  meta-disk internal;
  on mail1 {
    address 10.228.53.21:7788;
  }
  on mail2 {
    address 10.228.53.121:7788;
  }
}

One thing that stands out to me is the defaultfile= line in the init
script.  It says defaultfile="/etc/default/drbd", however there is no drbd
file in the /etc/default directory.  Could this have something to do with my
problem?  OS is Ubuntu 9.10 server edition.  Any help that can be offered is
greatly appreciated.  Let me know if I need to post any other output or
details.

-Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100419/e372d12a/attachment.htm>


More information about the drbd-user mailing list