DRBD “Device or resource busy”

centos7clusterdrbdpacemaker

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; 
   } 
}

Best Answer

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

Related Topic