linuxdebiandrbd

no resources defined drbd


I have a problem with the configuration of drbd

enter image description here

enter image description here

someone have any idea ?


Solution

  • Do your hostnames resolve correctly? I see you have the hostnames 'drbd-node1' and 'drbd-node2' in your resource configuration, but at your command prompt the hostname is 'node2'. DRBD parses the configuration for its own hostname to know what it needs to do.

    In your example, changing 'on drbd-node2', to 'on node2', should allow you to proceed.

    You'll need to update the hostnames in '/etc/hosts', to match what you have in '/etc/drbd.d/storage.res', and run the following command:

    # hostname node2
    

    Alternatively, you can see what the kernel is currently using as the hostname and set those in your DRBD configuration:

    # uname -n
    

    If that still doesn't do the trick, make sure that '/etc/drbd.conf' is including the resources defined in '/etc/drbd.d/'. The defaults should be:

    # grep include /etc/drbd.conf
    include "drbd.d/global_common.conf";
    include "drbd.d/*.res";