If the install and configuration procedures worked as expected, you are ready to run a basic test of the drbd functionality. This test also helps with understanding how the software works.
Test the DRBD service on node 1.
Open a terminal console, then log in as the root user or equivalent.
Create a mount point on node 1, such as /r0mount, by entering
mkdir /r0mount
Mount the drbd device by entering
mount -o rw /dev/drbd0 /r0mount
Create a file from the primary node by entering
touch /r0mount/from_node1
Test the DRBD service on node 2.
Open a terminal console, then log in as the root user or equivalent.
Dismount the disk on node 1 by typing the following command on node 1:
umount /r0mount
Downgrade the DRBD service on node 1 by typing the following command on node 1:
drbdadm secondary r0
On node 2, promote the DRBD service to primary by entering
drbdadm primary r0
On node 2, check to see if node 2 is primary by entering
rcdrbd status
On node 2, create a mount point such as /r0mount, by entering
mkdir /r0mount
On node 2, mount the DRBD device by entering
mount -o rw /dev/drbd0 /r0mount
Verify that the file you created on node 1 in Step 1.d is viewable by entering
ls /r0mount
The /r0mount/from_node1 file should be listed.
If the service is working on both nodes, the DRBD setup is complete.
Set up node 1 as the primary again.
Dismount the disk on node 2 by typing the following command on node 2:
umount /r0mount
Downgrade the DRBD service on node 2 by typing the following command on node 2:
drbdadm secondary r0
On node 1, promote the DRBD service to primary by entering
drbdadm primary r0
On node 1, check to see if node 1 is primary by entering
service drbd status
To get the service to automatically start and fail over if the server has a problem, you can set up DRBD as a high availability service with HeartBeat 2.
For information about installing and configuring HeartBeat 2 for SUSEŽ Linux Enterprise Server 10, see the HeartBeat 2 Installation and Setup Guide on the Novell Documentation Web site for SUSE Linux Enterprise Server 10.