Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue

Summary

DRBD bsr operates on two channels for one resource. Each channel is established in the opposite direction to each other, and operates as P2P without distinguishing between the server and the client.

In order to relay DRBD bsr communication, DRX also uses two channels. When DRX connection procedure is added, the number of connections increases to six.
In the local DRX, only four connections are visible except for the connection state between the remote DRX and the remote DRBDbsr.

Structure

Code Block
languagetext
themeRDark
titledrx-ctl connections all
-------------------------------------------------------------------------------------------
Name           Type local-drbdbsr-ip State          local-drx-ip State          remote-drx-ip 
-------------------------------------------------------------------------------------------
r0-node2-node1 data (local-drbdbsr)  -established-> (local-drx)  <-bridged----- (remote-drx)  
r0-node2-node1 meta (local-drbdbsr)  <-established- (local-drx)  -----bridged-> (remote-drx)  
-------------------------------------------------------------------------------------------
 All connections : 2, Established : 2

Each resource operates completely independently, and one resource consists of two channels. In the above output, the first channel is the Acceptor and the second channel is the Connector.
One channel manages two connections (local DRBDbsr, remote DRXdrx).

The connection of each channel including remote DRBD drbd is expressed as follows.

Inc drawio
simple0
zoom1
custContentId2066743578
pageId907674173
diagramDisplayNameDRX Acceptor and Connector.drawio
lbox1
hiResPreview0
baseUrlhttps://mantech.jira.com/wiki
diagramNameDRX Acceptor and Connector.drawio
imgPageId925040665
pCenter0
aspectDscmezm-DDMF4FHs2UjA 2
includedDiagram1
width732
aspectHasha83a318f9bb8745b1a544a1e451d87932e1b5076
linksauto
tbstyletop
height112

...

  • Acceptor
    • Receive remote DRX access through the outside IP / Port of the resource file.
    • Receive local DRBD bsr access through the inside IP / Port of the resource file.
  • Connector
    • Connect to outside IP / Port of remote DRX.
    • Connect to local DRBDbsr

When connecting to DRX, the channel type (meta / data) of each channel is undefined. When a connection with DRBD bsr is established, channel type is received from DRBDbsr.

Connection States

CategoryStatesChannel typeDescriptionAction
PreparingallocatingAllAllocating memory to BAB.Switches to 'bridging' state when memory allocation is complete.
Connection to
remote DRX
bridgingAll

Attempting to connect to remote DRX.

Switches to 'bridged' state when connection is complete.
bridgedAllConnected with remote DRX.

Switches to 'waiting' or 'connecting' state immediately.

Connection to
local DRBDbsr
waitingAcceptorWaiting for local DRBD bsr to connect.

Switches to 'connected' state when connected with DRBDbsr.

DRBD와 연결되면 connected 상태로 전환Once connected to bsr, switch to the connected state

connectingConnectorConnecting to local DRBDbsr.

After receiving the channel type from the remote DRX, connect to local DRBDbsr.
Switches to 'establishing' state when connected with DRBDbsr.

connectedAcceptorConnected with local DRBDbsr.

It receives the channel type from local DRBDbsr, transfers it to the remote DRX.
And switches to 'establishing' state.

establishingAllFinishing connection process.

Connector: forward 'established' event to remote DRX and switches to 'established' state.
Acceptor: When 'established' event is received from the remote DRX, it is switches to 'established' state.

establishedAllConnection process is complete.Starts relaying packet data of DRBDbsr.
Disconnectingclose_pendingAllCleanup steps before closing the connectionTransmits the remaining data of the BAB and switches to 'stopping' state.
stoppingAllClosing connectionCloses current connection and switches to 'stopped' state.
stoppedAllConnection closedPrepares for reconnection and switches to 'bridging' state.

State Changes

The state changes for each channel in normal connection is as follows.

Inc drawio
simple0
zoom1
custContentId2066841767
pageId795705367
diagramDisplayNameDRX state changes.drawio
lbox1
hiResPreview0
baseUrlhttps://mantech.jira.com/wiki
diagramNameDRX state changes.drawio
imgPageId925040665
pCenter0
includedDiagram1
width1051
aspectHash2be88ca4242c76e8253ac62474851065032d6833
linksauto
tbstyletop
height660


State change when disconnected:

  • Disconnected with local DRBDbsr
    1. Both channels are switchs to 'stopping' state. (data channel goes through 'close_pending' state to empty the BAB.)
    2. When the operation to close the connection is completed, it is switches to 'stopped' state.
    3. Switches to 'connection' or 'waiting' state for reconnection with local DRBDbsr.
  • Disconnected between remote DRBD bsr and remote DRX
    1. As in the above situation, local DRX is also switches to 'connecting' or 'waiting' state through 'stopping' and 'stopped' state.
    2. Since the local DRBD bsr can reconnect, the following operation is performed for each channel.
      1. Acceptor: DRBD  bsr will be connected and switches to 'establishing' state through 'connected' state.
      2. Connector: Since remote DRX is not connected to remote DRBDbsr, it remains 'connected' state.
  • Disconnected with remote DRX
    1. Both channels are switchs to 'stopping' state. (data channel goes through 'close_pending' state to empty the BAB.)
    2. When the operation to close the connection is completed, it is switches to 'stopped' state.
    3. Switches to 'bridging' state for reconnection with remote DRX.

Situation According To Connection States

AcceptorConnectorSituation
allocatingallocatingIt can be seen when the size of the TX BAB is very large or it is allocated to virtual memory and is slow.
bridgingbridgingRemote DRX is off, or local DRX and remote DRX can not connect to each other.
bridgingconnectingRemote DRX can not connect to local DRX.
waitingbridgingCan not connect to remote DRX.
waitingconnectingThe resource in the local DRBD bsr is not in the 'connecting' state or it can not connect to the local DRX.
establishingconnectingLocal DRBD bsr is connected, but remote DRX can not connect to remote DRBDbsr.
establishedconnectingLocal DRBD bsr can connect to local DRX, but local DRX can not connect to local DRBDbsr.
establishingestablished

Remote DRBD bsr can connect to remote DRX, but remote DRX can not connect to remote DRBDbsr.

waitingestablished

Local DRX can connect to local DRBDbsr, but local DRBD bsr can not connect to local DRX.

establishedconnecting

Remote DRX can connect to remote DRBDbsr, but remote DRBD bsr can not connect to remote DRX.

...