[DRBD-user] Help with initial setup

Mike Rowen mike at bcmr3.net
Wed Oct 8 22:53:01 CEST 2008

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


Since you are using internal meta data, I suggest that you unmount / 
stage stop and restart drbd, then overwrite this space by initializing  
the metadata - drbdadm create-md r0

At this point you can run mkfs but use the drbd device /deb/drbd1.  
Also when you mount the filesystem, use /deb/drbd1. Only drbd should  
reference the actual disk device.

If you want to mirror an existing disk partition, you should use  
exteral metadata devices. See the documentation. Hope this helps you  
along a bit. Also note that you must either disable iptables or open  
up the appropriate ports for DRBD to talk between nodes.

Regards,
Mike Rowen

On Oct 8, 2008, at 4:33 PM, kevin kempter <kevin at kevinkempterllc.com>  
wrote:

> Hi List;
>
> I'm a newbie to DRBD and I've hit a snag.
>
> Here's what I've done:
>
> 1) I setup 2 new installs of CentOS v5 (32bit) as VM's via vmware  
> server on a Dell 2900 (quad core, 16Gram, single RAID slice, etc)
>
> Note: I created /stage as a separate ext2 filesystem (mounted from / 
> dev/sda2). This is the filesystem I want to replicate with drbd
>
>
> 2) downloaded and compiled the drbd source (v 8.2.6) on both servers
>
> $ tar -xzvf drbd-8.2.6.tar.gz
> $ make clean all
>
> 3) ran the install
> # make install
>
> 4) edited my /etc/drbd.conf on both servers (VM's) to look like this:
>
> global {
>    usage-count yes;
> }
>
>
> common {
>  protocol C;
> }
>
>
> resource r0 {
>
>  on CentOS-32-VM1 {
>    device     /dev/drbd1;
>    disk       /dev/sda2;
>    address    192.168.1.50:7788;
>    meta-disk  internal;
>  }
>
>  on CentOS-32-VM2 {
>    device    /dev/drbd1;
>    disk      /dev/sda2;
>    address   192.168.1.51:7788;
>    meta-disk internal;
>  }
> }
>
>
> 5) Installed the drbd module
>
> # modprobe drbd
>
>
>
> 6) attempted to run drbdadm attach
>
> # drbdadm attach r0
>
> /dev/drbd1: Failure: (114) Lower device is already claimed. This  
> usually means it is mounted.
> Command 'drbdsetup /dev/drbd1 disk /dev/sda2 /dev/sda2 internal -- 
> set-defaults --create-device' terminated with exit code 10
>
>
>
> 7) I thought based on the msg above that /dev/sda2 maybe should not  
> be mounted so I unmounted /stage and tried again:
>
> # umount /stage (did this on both servers)
>
> # drbdadm attach r0
> /dev/drbd1: Failure: (119) No valid meta-data signature found.
>
>    ==> Use 'drbdadm create-md res' to initialize meta-data area. <==
>
> Command 'drbdsetup /dev/drbd1 disk /dev/sda2 /dev/sda2 internal -- 
> set-defaults --create-device' terminated with exit code 10
>
>
>
>
> Anyone have any thoughts ?
>
> Thanks in advance...
>
>
>
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user



More information about the drbd-user mailing list