This guide describes DRBD version 8.4 and above. For 8.3 please look here.
Since GFS is a shared cluster file system expecting concurrent read/write storage access from all cluster nodes, any DRBD resource to be used for storing a GFS filesystem must be configured in dual-primary mode. Also, it is recommended to use some of DRBD’s features for automatic recovery from split brain. And, it is necessary for the resource to switch to the primary role immediately after startup. To do all this, include the following lines in the resource configuration:
resource <resource> {
startup {
become-primary-on both;
...
}
net {
allow-two-primaries yes;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
...
}
...
}Once you have added these options to your freshly-configured resource, you may initialize your resource as you normally would. Since the
allow-two-primaries option is set to yes for
this resource, you will be able to promote the resourceto the primary role on both nodes.
This guide describes DRBD version 8.4 and above. For 8.3 please look here.