![]() | Note |
|---|---|
The following procedure uses the server names node 1 and node 2, and the cluster resource name r0. It sets up node 1 as the primary node. Make sure to modify the instructions to use your own node and file names. | |
Log in as the root user or equivalent on each node.
Open the /etc/drbd.conf file on the primary node (node1) in a text editor, modify the following parameters in the on hostname {} sections, then save the file.
hostname
device
disk
address
meta-disk
All of these options are explained in the examples in the /usr/share/doc/packages/drbd/drbd.conf file and in the man page of drbd.conf(5).
Copy the /etc/drbd.conf file to the /etc/drbd.conf location on the secondary server (node 2).
scp /etc/drbd.conf <node 2> /etc
Initialize and start the drbd service on both systems by entering the following on each node:
rcdrbd start
Configure node1 as the primary node by entering the following on node1:
drbdsetup /dev/drbd0 primary --do-what-I-say
![]() | Note |
|---|---|
The --do-what-i-say option has been renamed to --overwrite-data-of-peer in the recent versions of DRBD. | |
Check the DRBD service status by entering the following on each node:
rcdrbd status
Before proceeding, wait until the block devices on both nodes are fully synchronized. Repeat the rcdrbd status command to follow the synchronization progress.
After the block devices on both nodes are fully synchronized, format the DRBD device on the primary with a file system such as reiserfs. Any Linux file system can be used. For example, enter
mkfs.reiserfs -f /dev/drbd0
![]() | Important |
|---|---|
Always use the | |