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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s