The DRBD Proxy processes can either be located directly on the machines where DRBD is set up, or they can be placed on distinct dedicated servers. A DRBD Proxy instance can server as proxy for multiple DRBD devices of multiple nodes.
DRBD Proxy is completely transparent to DRBD. Typically you will expect a high number of data packets in flight, therefore the activity log should be reasonably large. A big transfer log causes longer re-sync runs after the crash of a primary node. Therefore it is recommended to enable DRBD's csums-alg setting.
DRBD Proxy is configured in DRBD's main configuration
file. It is configured by an additional options section called
proxy and additional proxy on
sections within the host
sections.
Below is a DRBD configuration example for proxies running directly on the DRBD nodes:
resource r0 {
protocol c;
device minor 0;
disk /dev/sdb1;
flexible-meta-disk /dev/sdb2;
proxy {
compression on;
memlimit 100M;
}
on alice {
address 127.0.0.1:7789;
proxy on alice {
inside 127.0.0.1:7788;
outside 192.168.23.1:7788;
}
}
on bob {
address 127.0.0.1:7789;
proxy on bob {
inside 127.0.0.1:7788;
outside 192.168.23.2:7788;
}
}
}The inside IP address is used for
communication between DRBD and the DRBD Proxy, whereas
the outside IP address is used for communication
between the proxies.
drbdadm offers the proxy-up and
proxy-down subcommands to configure or delete the
connection to the local DRBD Proxy process of the named DRBD
resource(s). These commands are used by the start
and stop actions which
/etc/init.d/drbdproxy implements.
The DRBD Proxy has a low level configuration tool, called
drbd-proxy-ctl. When called without any option it
operates in interactive mode. The available commands are
displayed by the 'help' command.
Help for drbd-proxy. -------------------- add connection <name> <ip-listen1>:<port> <ip-connect1>:<port> <ip-listen2>:<port> <ip-connect2>:<port> Creates a communication path between two DRBD instances. set memlimit <name> <memlimit-in-bytes> Sets memlimit for connection <name> del connection <name> Deletes communication path named name. show Shows currently configured communication paths. show memusage Shows memory usage of each connection. list [h]subconnections Shows currently established individual connections together with some stats. With h outputs bytes in human readable format. list [h]connections Shows currently configured connections and their states With h outputs bytes in human readable format. list details Shows currently established individual connections with counters for each DRBD packet type. quit Exits the client program (closes control connection). shutdown Shuts down the drbd-proxy program. Attention: this unconditionally terminates any DRBD connections running.