![]() | |
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. | |
Start YaST and select the configuration module +.
In + select to start drbd always at boot time.
If you need to configure more than one replicated resource, select . The input field selects how many different drbd resources may be configured without restarting the computer.
The actual configuration of the resource is done in . Press to create a new resource. The following parameters have to be set:
|
|
The name of the resource, often called |
|
|
The hostname of the respective node. |
|
|
The IP address and port number of the respective node. |
|
|
The device that holds the replicated data on the respective node. Use this device to create file systems and mount operations. |
|
|
The device that is replicated between both nodes. |
|
|
The is either set to the value
When using
A real device may also be used for multiple drbd resources. For
example, if your is
|
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:
drbdadm create-md r0 rcdrbd start
Configure node1 as the primary node by entering
the following on node1:
drbdsetup /dev/drbd0 primary --overwrite-data-of-peer
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
![]() | |
Always use the | |