────────────────────────────────────────────────────────────────────────────────
Enable DRBD resource first time(theses commands must be issued on both nodes)
────────────────────────────────────────────────────────────────────────────────
(1) Run this command on node1 server first:
[root@centos6-ocfs2-1]# drbdadm create-md ocfs2;
--------------------------------------------------------------------------------
DRBD module version: 8.3.11
userland version: 8.3.13
preferably kernel and userland versions should match.
--== Thank you for participating in the global usage survey ==--
The server's response is:
you are the 6358th user to install this version
md_offset 1069248512
al_offset 1069215744
bm_offset 1069182976
Found some data
==> This might destroy existing data! <==
Do you want to proceed?
[need to type 'yes' to confirm] yes
Writing meta data...
initializing activity log
NOT initialized bitmap
New drbd meta data block successfully created.
success
--------------------------------------------------------------------------------
[root@centos6-ocfs2-1]# drbdadm up ocfs2;
--------------------------------------------------------------------------------
DRBD module version: 8.3.11
userland version: 8.3.13
preferably kernel and userland versions should match.
--------------------------------------------------------------------------------
(2) Run this command on node2 server now:
[root@centos6-ocfs2-2]# drbdadm create-md ocfs2;
[root@centos6-ocfs2-2]# drbdadm up ocfs2;
(3) Check the DRBD status:
# lsmod | grep drbd
--------------------------------------------------------------------------------
drbd 241802 2
lru_cache 5940 1 drbd
--------------------------------------------------------------------------------
# cat /proc/drbd
--------------------------------------------------------------------------------
version: 8.3.11 (api:88/proto:86-96)
srcversion: DA5A13F16DE6553FC7CE9B2
0: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r----s
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:1044124
--------------------------------------------------------------------------------
# /etc/init.d/drbd status; # (Waiting node2 to connect);
--------------------------------------------------------------------------------
drbd driver loaded OK; device status:
version: 8.3.11 (api:88/proto:86-96)
srcversion: DA5A13F16DE6553FC7CE9B2
m:res cs ro ds p mounted fstype
0:ocfs2 WFConnection Secondary/Unknown Inconsistent/DUnknown C
--------------------------------------------------------------------------------
# /etc/init.d/drbd status; # (When node2 connected, status change);
--------------------------------------------------------------------------------
drbd driver loaded OK; device status:
version: 8.3.11 (api:88/proto:86-96)
srcversion: DA5A13F16DE6553FC7CE9B2
m:res cs ro ds p mounted fstype
0:ocfs2 Connected Secondary/Secondary Inconsistent/Inconsistent C
--------------------------------------------------------------------------------
Note: both notes will be Secondary, as the devices still need to be initial.
(4) DRBE relevant Files:
/dev/drbd0
/dev/drbd
/dev/drbd/by-disk
/dev/drbd/by-disk/sdb1
/dev/drbd/by-res
/dev/drbd/by-res/ocfs2
/dev/.udev/links/drbd\x2fby-disk\x2fsdb1
/dev/.udev/links/drbd\x2fby-res\x2focfs2