DRBD – not defined in your config (for this host)

DRBD – <resource> not defined in your config (for this host)

I encountered the following error while creating a new DRBD resource for the HA cluster.

# drbdadm create-md r0
--== Thank you for participating in the global usage survey ==--
The server's response is:
'r0' not defined in your config (for this host).

Troubleshooting process….

Hostname is linuxzfs1.local

[root@linuxzfs1 drbd.d]# uname -a
Linux linuxzfs1.local 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

However, resource is defined as linuxzfs1.(Note the highlighted)

[root@linuxzfs1 drbd.d]# cat /etc/drbd.dr0.res
resource r0 {
 device /dev/drbd1;
 disk /dev/sdb;
 meta-disk internal;
 on linuxzfs1 {
 address 192.168.56.181:7789;
 }
 on linuxzfs2 {
 address 192.168.56.182:7789;
 }
}

Modify the r0.res to ensure the hostname is defined correctly both in r0.res and /etc/hostname

[root@linuxzfs1 drbd.d]# cat r0.res
resource r0 {
 device /dev/drbd1;
 disk /dev/sdb;
 meta-disk internal;
 on linuxzfs1.local {
 address 192.168.56.181:7789;
 }
 on linuxzfs2.local {
 address 192.168.56.182:7789;
 }
}

After the file have been modified correctly, the drbdadm command executed successfully now.

# drbdadm create-md r0
initializing activity log
NOT initializing bitmap
Writing meta data...
New drbd meta data block successfully created.

Regards,
Wei Shan

5 thoughts on “DRBD – not defined in your config (for this host)”

  1. May i know why am getting this error when try to create new dvice

    [root@centos11 weak-updates]# drbdadm create-md testdata
    open(interval) failed: No such file or directory
    open(interval) failed: No such file or directory
    Command ‘drbdmeta 0 v08 interval flex-external create-md’ terminated with exit code 20

Leave a comment