Installing and Managing DRBD Services
103
no
vd
ocx
(e
n)
6 Ap
ril 20
07
7
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
/dev/drbd<n>
name in the command, not the actual
/
dev/disk
device name.
9.4 Testing the DRBD Service
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.
1
Test the DRBD service on node 1.
1a
Open a terminal console, then log in as the
root
user or equivalent.
1b
Create a mount point on node 1, such as
/r0mount
, by entering
mkdir /r0mount
1c
Mount the
drbd
device by entering
mount -o rw /dev/drbd0 /r0mount
1d
Create a file from the primary node by entering
touch /r0mount/from_node1
2
Test the DRBD service on node 2.
2a
Open a terminal console, then log in as the
root
user or equivalent.
2b
Dismount the disk on node 1 by typing the following command on node 1:
umount /r0mount
2c
Downgrade the DRBD service on node 1 by typing the following command on node 1:
drbdadm secondary r0
2d
On node 2, promote the DRBD service to primary by entering
drbdadm primary r0
2e
On node 2, check to see if node 2 is primary by entering
rcdrbd status
2f
On node 2, create a mount point such as
/r0mount
, by entering
mkdir /r0mount
2g
On node 2, mount the DRBD device by entering
mount -o rw /dev/drbd0 /r0mount
2h
Verify that the file you created on node 1 in
Step 1d
is viewable by entering
ls /r0mount
The
/r0mount/from_node1
file should be listed.
3
If the service is working on both nodes, the DRBD setup is complete.
4
Set up node 1 as the primary again.
4a
Dismount the disk on node 2 by typing the following command on node 2:
umount /r0mount
4b
Downgrade the DRBD service on node 2 by typing the following command on node 2:
Содержание LINUX ENTERPRISE SERVER 10 - STORAGE ADMINISTRATION GUIDE 7-2007
Страница 4: ...novdocx en 6 April 2007...
Страница 30: ...30 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Страница 42: ...42 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Страница 58: ...58 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Страница 90: ...90 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Страница 100: ...100 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Страница 106: ...106 SLES 10 Storage Administration Guide novdocx en 6 April 2007...