无法启动drbd服务,并且无法在CentOS 7.3上设置DRBD 8.4的主节点

使用两个节点来安装DRBD。

  • 节点1
  • 节点2

遵循这个指南:

http://www.learnitguide.net/2016/07/how-to-install-and-configure-drbd-on-linux.html

在两个节点上

resource testdata1 { protocol C; on node1 { device /dev/drbd0; disk /dev/sdb; address 192.168.0.1:7788; meta-disk internal; } on node2 { device /dev/drbd0; disk /dev/sdb; address 192.168.0.2:7788; meta-disk internal; } } 

在node2上

在运行systemctl start drbd ,进程有待处理。 等待很长时间没有结果。 但是node1在这一步运行良好。

在node1上

运行drbdadm primary testdata1 ,得到这个错误:

 0: Failure: (127) Device minor not allocated additional info from kernel: unknown minor Command 'drbdsetup-84 primary 0' terminated with exit code 10 

编辑

在node2上运行systemctl status drbd

 ● drbd.service - DRBD -- please disable. Unless you are NOT using a cluster manager. Loaded: loaded (/usr/lib/systemd/system/drbd.service; disabled; vendor preset: disabled) Active: activating (start) since 木 2017-07-20 01:18:32 EDT; 1min 32s ago Main PID: 9137 (drbd) CGroup: /system.slice/drbd.service ├─9137 /bin/bash /lib/drbd/drbd start ├─9145 drbdadm wait-con-int └─9146 drbdsetup-84 wait-connect 0 7月 20 01:18:32 node2 drbd[9137]: WARN: stdin/stdout is not a TTY; using /dev/con...ied 7月 20 01:18:42 node2 drbd[9137]: WARN: stdin/stdout is not a TTY; using /dev/con...... 7月 20 01:18:42 node2 drbd[9137]: ***********************************************...*** 7月 20 01:18:42 node2 drbd[9137]: DRBD's startup script waits for the peer node(s...ar. 7月 20 01:18:42 node2 drbd[9137]: - If this node was already a degraded cluster b...the 7月 20 01:18:42 node2 drbd[9137]: reboot, the timeout is 0 seconds. [degr-wfc-timeout] 7月 20 01:18:42 node2 drbd[9137]: - If the peer was available before the reboot, ...out 7月 20 01:18:42 node2 drbd[9137]: is 0 seconds. [wfc-timeout] 7月 20 01:18:42 node2 drbd[9137]: (These values are for resource 'testdata1'; 0 s...er) 7月 20 01:18:42 node2 drbd[9137]: To abort waiting for DRBD connections, kill thi...145 Hint: Some lines were ellipsized, use -l to show in full. 

在node2上运行journalctl -u drbd

 -- Logs begin at 水 2017-07-12 22:45:19 EDT, end at 木 2017-07-20 01:18:42 EDT. -- 7月 18 05:49:18 node2 systemd[1]: Starting DRBD -- please disable. Unless you are NOT using a cluster manager.... 7月 18 05:49:18 node2 drbd[23883]: Starting DRBD resources: drbd.d/testdata1.res:12: in resource testdata1, on node2: 7月 18 05:49:18 node2 drbd[23883]: IP 198.10.0.219 not found on this host. 7月 18 05:49:18 node2 systemd[1]: drbd.service: main process exited, code=exited, status=20/n/a 7月 18 05:49:18 node2 systemd[1]: Failed to start DRBD -- please disable. Unless you are NOT using a cluster manager.. 7月 18 05:49:18 node2 systemd[1]: Unit drbd.service entered failed state. 7月 18 05:49:18 node2 systemd[1]: drbd.service failed. 7月 18 05:50:57 node2 systemd[1]: Starting DRBD -- please disable. Unless you are NOT using a cluster manager.... 7月 18 05:50:57 node2 drbd[23898]: Starting DRBD resources: [ 7月 18 05:50:57 node2 drbd[23898]: create res: testdata1 7月 18 05:50:57 node2 drbd[23898]: prepare disk: testdata1 7月 18 05:50:57 node2 drbd[23898]: adjust disk: testdata1:failed(apply-al:20) 7月 18 05:50:57 node2 drbd[23898]: adjust net: testdata1 7月 18 05:50:57 node2 drbd[23898]: ] 7月 18 05:50:57 node2 drbd[23898]: WARN: stdin/stdout is not a TTY; using /dev/consoleopen('/dev/console, O_RDONLY): Permission denied 7月 18 05:51:07 node2 drbd[23898]: WARN: stdin/stdout is not a TTY; using /dev/console.......... 7月 18 05:51:07 node2 drbd[23898]: *************************************************************** 7月 18 05:51:07 node2 drbd[23898]: DRBD's startup script waits for the peer node(s) to appear. 7月 18 05:51:07 node2 drbd[23898]: - If this node was already a degraded cluster before the 7月 18 05:51:07 node2 drbd[23898]: reboot, the timeout is 0 seconds. [degr-wfc-timeout] 7月 18 05:51:07 node2 drbd[23898]: - If the peer was available before the reboot, the timeout 7月 18 05:51:07 node2 drbd[23898]: is 0 seconds. [wfc-timeout] 7月 18 05:51:07 node2 drbd[23898]: (These values are for resource 'testdata1'; 0 sec -> wait forever) 7月 18 05:51:07 node2 drbd[23898]: To abort waiting for DRBD connections, kill this process: kill 23916 7月 20 01:15:48 node2 systemd[1]: Stopped DRBD -- please disable. Unless you are NOT using a cluster manager.. 7月 20 01:16:06 node2 systemd[1]: Starting DRBD -- please disable. Unless you are NOT using a cluster manager.... 7月 20 01:16:06 node2 drbd[9092]: Starting DRBD resources: [ 7月 20 01:16:06 node2 drbd[9092]: adjust disk: testdata1:failed(apply-al:20) 7月 20 01:16:06 node2 drbd[9092]: ] 7月 20 01:16:06 node2 drbd[9092]: WARN: stdin/stdout is not a TTY; using /dev/consoleopen('/dev/console, O_RDONLY): Permission denied 7月 20 01:16:13 node2 drbd[9092]: WARN: stdin/stdout is not a TTY; using /dev/console....... 7月 20 01:16:13 node2 systemd[1]: Stopped DRBD -- please disable. Unless you are NOT using a cluster manager.. 7月 20 01:18:32 node2 systemd[1]: Starting DRBD -- please disable. Unless you are NOT using a cluster manager.... 7月 20 01:18:32 node2 drbd[9137]: Starting DRBD resources: [ 7月 20 01:18:32 node2 drbd[9137]: ] 7月 20 01:18:32 node2 drbd[9137]: WARN: stdin/stdout is not a TTY; using /dev/consoleopen('/dev/console, O_RDONLY): Permission denied 7月 20 01:18:42 node2 drbd[9137]: WARN: stdin/stdout is not a TTY; using /dev/console.......... 7月 20 01:18:42 node2 drbd[9137]: *************************************************************** 7月 20 01:18:42 node2 drbd[9137]: DRBD's startup script waits for the peer node(s) to appear. 7月 20 01:18:42 node2 drbd[9137]: - If this node was already a degraded cluster before the 7月 20 01:18:42 node2 drbd[9137]: reboot, the timeout is 0 seconds. [degr-wfc-timeout] 7月 20 01:18:42 node2 drbd[9137]: - If the peer was available before the reboot, the timeout 7月 20 01:18:42 node2 drbd[9137]: is 0 seconds. [wfc-timeout] 7月 20 01:18:42 node2 drbd[9137]: (These values are for resource 'testdata1'; 0 sec -> wait forever) 7月 20 01:18:42 node2 drbd[9137]: To abort waiting for DRBD connections, kill this process: kill 9145 

在node2上运行cat /proc/drbd

 GIT-hash: 9976da086367a2476503ef7f6b13d4567327a280 build by akemi@Build64R7, 2016-12-04 01:08:48 0: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r----s ns:0 nr:0 dw:0 dr:0 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2097052 

DRBD目前没有连接到其同行。 这清楚地显示在连接状态字段下的/proc/drbdcs:WFConnection

此外,磁盘状态字段中显示的磁盘状态报告为“不一致”: ds:Inconsistent/DUnknown

您将需要确定为什么他们没有连接,让他们连接,然后您将需要完成初步同步,如DRBD用户指南中所述: https : //docs.linbit.com/doc/users-guide- 84 / S-初始全同步/