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; 
   } 
}
Rot-man
  • 327
  • 2
  • 9
Tibor BERNARD
  • 123
  • 1
  • 2
  • 9
  • 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

3 Answers3

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

Matt Kereczman
  • 1,899
  • 9
  • 12
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.

Moshe Sharon
  • 71
  • 1
  • 2
0

Stop the drbd service on the nodes.

systemctl stop drbd

cwill
  • 1