0

So today I've been asked to configure a cluster on Centos7 using pacemaker and drbd.

Everything was going fine until I tried to create a the local meta data for my resource ( a simple web server).

The output of my

drbdadm create-md wwwdata

command left me a bit puzzled.

open(/dev/centos_rick/drbd-demo) failed: Device or resource busy

being me I tried to force through with:

Exclusive open failed. Do it anyways? [need to type 'yes' to confirm]

And just ended up with an error:

Command 'drbdmeta 1 v08 /dev/centos_rick/drbd-demo internal create-md' terminated with exit code 20

Does anyone have an idea of why i'm confronted to this.

DRBD configuration:

resource wwwdata { protocol C; meta-disk internal; device /dev/drbd1; syncer { verify-alg sha1; } net { allow-two-primaries; } on rick { disk /dev/centos_rick/drbd-demo; address 192.168.1.60:7789; } on summer { disk /dev/centos_summer/drbd-demo; address 192.168.1.61:7789; } } 
3
  • Try to unmount your device, destroy any partition table etc. on your disks and recreate the MD. Your complete DRBD config would help, too. Commented Jun 29, 2018 at 12:01
  • resource wwwdata { protocol C; meta-disk internal; device /dev/drbd1; syncer { verify-alg sha1; } net { allow-two-primaries; } on rick { disk /dev/centos_rick/drbd-demo; address 192.168.1.60:7789; } on summer { disk /dev/centos_summer/drbd-demo; address 192.168.1.61:7789; } } Commented Jun 29, 2018 at 12:47
  • So that's my config file along with the global_common.conf, i'll get on deleting the partitions and come back to you Commented Jun 29, 2018 at 12:59

3 Answers 3

2

Something is holding the backing disk open preventing DRBD from being able to create the meta-data on it. Make sure the device isn't mounted, then try recreating your metadata:

# umount /dev/centos_rick/drbd-demo && drbdadm create-md wwwdata

2

Probably you have a running process (or processes) running on the current active drbd node.

run the following command to show which processes are running

lsof /dev/drbd0

and kill the processes then umount the filesystem on the active node and mount on the secondary node.

0

Stop the drbd service on the nodes.

systemctl stop drbd

1
  • 2
    It would be helpful if you could explain further how this will solve the problem. Commented Mar 17, 2019 at 21:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.