In order to create a GFS filesystem on your dual-primary DRBD
resource, issue this command on (only) one (!) node (which must be Primary
):
mkfs -t gfs2 -p lock_dlm -j 2 -t <cluster>:<name> /dev/<drbd-resource>
The -j
option in this command refers to the number of journals to
keep for GFS. This must be identical to the number of nodes in the GFS
cluster; since DRBD does not support more than two nodes, the value to
set here is always 2.
![]() | Tip |
---|---|
With DRBD 9 it is possible to share the same disk among more than two nodes; if you want to do that, you’ll either have to specify a higher number of journals or create the journals in the live file system. |
The -t
option, defines the lock
table name. This follows the format <cluster>:<name>, where <cluster>
must match your cluster name as defined in
/etc/cluster/cluster.conf
. Thus, only members of that cluster will
be permitted to use the filesystem. By contrast, <name> is an
arbitrary file system name unique in the cluster.