The host-name argument must match the Linux host name (uname -n).
So you must specify the host names of the nodes in the on section of the configuration file.
If you could expand on the motivation to not use hostnames in the configuration file I may be able to provide some ideas on how to work within what constraint you have so feel free to share those.
We currently have high availability clusters at our manufacturing sites where the hostnames are fully qualified domain names: example: site1-ha1.br.net, site1-ha2.br.net.
For consistency we would prefer to use a common name in the resource file, like node1, node2 ⌠This would simplify our configurations to where we donât need to change the resource file everytime we update the hosts.
I am not sure I really understand the use case here and why you couldnât just use hostnames, but perhaps a possible solution for you might be to use DRBDâs âfloating peersâ feature?
(DRBD 9.0 en - LINBIT)
Thank you for your emails.
Here is an example of how we currently configure the clusterin three factitious sites. Each site resides in a DMZ. What we would like to do is use an alternate name for each node. That way we could use this universally. Is this possible?
The graphic is somewhat helpful, but itâs still not completely clear to me.
So, we have two nodes in each site, and want all sites connected? If the two nodes utilize shared storage and only one is ever active at a time, then the floating peers features I linked to previously is exactly what you want.
If the nodes all operate independently and have their own storage then just create a six node cluster.
Maybe I have this all wrong and itâs three completely different two node cluster that are not meant to be connected to each other? If so, then just use hostnames per usual.
I suppose what isnât clear to me is why canât you just use the hostnames? What is the problem youâre trying to address here?
These are three independent clusters with 2 nodes in each. What we are trying to do is use an alternate hostname so that DRBD is not dependent on the hostname. This would simplify our setups. If it is required to have use the hostname then we will have to live with it.
The only other alternative is to use floating peers, as Devin suggested earlier in this thread. Note that floating peer configurations do not rely on hostnames, they instead rely on stable IP addresses. Also, floating peers is currently limited to two nodes only.
[root@mfgtest-ha3 ~]# drbdadm create-md export
You want me to create a v09 style flexible-size internal meta data block.
There appears to be a v09 flexible-size internal meta data block
already in place on /dev/mapper/ol-export at byte offset 2858732744704
Do you really want to overwrite the existing meta-data?
[need to type 'yes' to confirm] yes
md_offset 2858732744704
al_offset 2858732711936
bm_offset 2858645467136
Found ext3 filesystem
2791645964 kB data area apparently used
2791645964 kB left usable by current configuration
Even though it looks like this would place the new meta data into
unused space, you still need to confirm, as this is only a guess.
Do you want to proceed?
[need to type 'yes' to confirm] yes
initializing activity log
initializing bitmap (83 MB) to all zero
Writing meta data...
New drbd meta data block successfully created.
[root@mfgtest-ha3 ~]#
[root@mfgtest-ha3 ~]# drbdadm up all
export: Failure: (162) Invalid configuration request
additional info from kernel:
invalid name (strict_names=1 allows only [0-9A-Za-z+._-])
Command 'drbdsetup new-peer export 0 --_name=[10.0.0.81:7788](http://10.0.0.81:7788)' terminated with exit code 10
[root@mfgtest-ha3 ~]#
If you look at the example configuration I provided, and then look at the configuration you used, you can see that the IP address and port numbers were turned into markdown links. Thatâs not the correct syntax and is what DRBD is complaining about.
[root@mfgtest-ha3 ~]# drbdadm up all export: Failure: (162) Invalid configuration request additional info from kernel: invalid name (strict_names=1 allows only [0-9A-Za-z+._-]) Command 'drbdsetup new-peer export 0 --_name=[10.0.0.81:7788](http://10.0.0.81:7788)' terminated with exit code 10 [root@mfgtest-ha3 ~]#
In your error output you show this from drbdsetup (which includes the bad/markdown syntax):
[root@mfgtest-ha3 ~]# drbdadm up all export: Failure: (162) Invalid configuration request additional info from kernel: invalid name (strict_names=1 allows only [0-9A-Za-z+._-]) Command 'drbdsetup new-peer export 0 --_name=[10.0.0.81:7788](http://10.0.0.81:7788)' terminated with exit code 10
Maybe I donât know what you mean when you say, âit shows in markdown from the email onlyâ.
The configuration Iâve written in this post works for me.