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; 
   } 
}
  • Try to unmount your device, destroy any partition table etc. on your disks and recreate the MD. Your complete DRBD config would help, too. – Lenniey Jun 29 '18 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; } } – Tibor BERNARD Jun 29 '18 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 – Tibor BERNARD Jun 29 '18 at 12:59
1

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

| improve this answer | |
0

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.

| improve this answer | |
0

Stop the drbd service on the nodes.

systemctl stop drbd

| improve this answer | |
  • 2
    It would be helpful if you could explain further how this will solve the problem. – womble Mar 17 '19 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.