요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
// vim: set sw=2 sts=2 :
digraph {
rankdir=BT
bgcolor=white
node [shape=plaintext]
node [fontcolor=black]
StandAlone [ style=filled,fillcolor=gray,label=StandAlone ]
node [fontcolor=lightgray]
Unconnected [ label=Unconnected ]
CommTrouble [ shape=record,
label="{communication loss|{Timeout|BrokenPipe|NetworkFailure}}" ]
node [fontcolor=gray]
subgraph cluster_try_connect {
label="try to connect, handshake"
rank=max
WFConnection [ label=WFConnection ]
WFReportParams [ label=WFReportParams ]
}
TearDown [ label=TearDown ]
Connected [ label=Connected,style=filled,fillcolor=green,fontcolor=black ]
node [fontcolor=lightblue]
StartingSyncS [ label=StartingSyncS ]
StartingSyncT [ label=StartingSyncT ]
subgraph cluster_bitmap_exchange {
node [fontcolor=red]
fontcolor=red
label="new application (WRITE?) requests blocked\lwhile bitmap is exchanged"
WFBitMapT [ label=WFBitMapT ]
WFSyncUUID [ label=WFSyncUUID ]
WFBitMapS [ label=WFBitMapS ]
}
node [fontcolor=blue]
cluster_resync [ shape=record,label="{<any>resynchronisation process running\l'concurrent' application requests allowed|{{<T>PausedSyncT\nSyncTarget}|{<S>PausedSyncS\nSyncSource}}}" ]
node [shape=box,fontcolor=black]
// drbdadm [label="drbdadm connect"]
// handshake [label="drbd_connect()\ndrbd_do_handshake\ndrbd_sync_handshake() etc."]
// comm_error [label="communication trouble"]
//
// edges
// --------------------------------------
StandAlone -> Unconnected [ label="drbdadm connect" ]
Unconnected -> StandAlone [ label="drbdadm disconnect\lor serious communication trouble" ]
Unconnected -> WFConnection [ label="receiver thread is started" ]
WFConnection -> WFReportParams [ headlabel="accept()\land/or \lconnect()\l" ]
WFReportParams -> StandAlone [ label="during handshake\lpeers do not agree\labout something essential" ]
WFReportParams -> Connected [ label="data identical\lno sync needed",color=green,fontcolor=green ]
WFReportParams -> WFBitMapS
WFReportParams -> WFBitMapT
WFBitMapT -> WFSyncUUID [minlen=0.1,constraint=false]
WFBitMapS -> cluster_resync:S
WFSyncUUID -> cluster_resync:T
edge [color=green]
cluster_resync:any -> Connected [ label="resnyc done",fontcolor=green ]
edge [color=red]
WFReportParams -> CommTrouble
Connected -> CommTrouble
cluster_resync:any -> CommTrouble
edge [color=black]
CommTrouble -> Unconnected [label="receiver thread is stopped" ]
}
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
연결 협상, 동기화 및 장애 복구 상태 전이
1-85이 DOT 그래프는 DRBD 연결이 독립 실행 상태에서 시작해 연결 협상, 비트맵 교환과 재동기화를 거쳐 정상 연결 상태에 이르는 흐름을 나타냅니다. `rankdir=BT`는 그래프를 아래에서 위로 배치하고, 흰 배경과 글자색·채움색은 상태의 성격과 진행 단계를 구분합니다. `StandAlone`은 회색, `Connected`는 녹색으로 채워져 시작점과 정상 완료 상태를 강조합니다.
`StandAlone`에서 `drbdadm connect`를 실행하면 `Unconnected`로 이동하고 수신 스레드가 시작되면 `WFConnection`에 들어갑니다. `accept()` 또는 `connect()`가 성립하면 `WFReportParams`에서 피어 매개변수를 교환합니다. 핸드셰이크 중 필수 조건에 합의하지 못하면 `StandAlone`으로 돌아가며, 데이터가 동일해 동기화가 필요 없으면 바로 `Connected`가 됩니다.
동기화가 필요한 경우 소스 쪽은 `WFBitMapS`, 대상 쪽은 `WFBitMapT`로 분기합니다. 대상은 `WFSyncUUID`를 한 번 더 거친 뒤 재동기화 대상 포트로 들어가고, 소스는 재동기화 소스 포트로 직접 들어갑니다. 비트맵 교환 클러스터의 빨간 설명은 비트맵을 교환하는 동안 새 애플리케이션 요청, 특히 쓰기 요청이 차단됨을 뜻합니다.
`cluster_resync`는 재동기화가 진행되는 `SyncSource`·`SyncTarget`과 일시 정지 상태 `PausedSyncS`·`PausedSyncT`를 한 레코드로 묶습니다. 이 구간에서도 동시 애플리케이션 요청은 허용됩니다. 재동기화가 끝나면 녹색 간선을 따라 `Connected`로 이동합니다. 원문의 간선 라벨 `resnyc done`은 `resync done`의 오타이지만 원문 보존을 위해 그대로 유지합니다.
`WFReportParams`, `Connected`, 재동기화 실행 상태에서 통신 손실이 발생하면 빨간 간선을 따라 `CommTrouble`로 이동합니다. 이 레코드는 `Timeout`, `BrokenPipe`, `NetworkFailure`를 통신 손실의 세 유형으로 열거합니다. 수신 스레드가 정지하면 `Unconnected`로 돌아가 재연결을 준비합니다. `TearDown`, `StartingSyncS`, `StartingSyncT`는 그래프에 선언되어 있지만 이 파일에서는 연결된 전이 간선이 없습니다.
협상 결과에 따른 정상 연결, 소스 재동기화, 대상 재동기화 경로를 구조화해 보여 줍니다.
원문에 선언된 모든 상태, 레코드 및 클러스터의 의미를 정리합니다.
DOT 원문의 16개 방향 간선을 빠짐없이 한국어로 설명합니다.
// vim: set sw=2 sts=2 :
digraph {
rankdir=BT
bgcolor=white
node [shape=plaintext]
node [fontcolor=black]
StandAlone [ style=filled,fillcolor=gray,label=StandAlone ]
node [fontcolor=lightgray]
Unconnected [ label=Unconnected ]
CommTrouble [ shape=record,
label="{communication loss|{Timeout|BrokenPipe|NetworkFailure}}" ]
node [fontcolor=gray]
subgraph cluster_try_connect {
label="try to connect, handshake"
rank=max
WFConnection [ label=WFConnection ]
WFReportParams [ label=WFReportParams ]
}
TearDown [ label=TearDown ]
Connected [ label=Connected,style=filled,fillcolor=green,fontcolor=black ]
node [fontcolor=lightblue]
StartingSyncS [ label=StartingSyncS ]
StartingSyncT [ label=StartingSyncT ]
subgraph cluster_bitmap_exchange {
node [fontcolor=red]
fontcolor=red
label="new application (WRITE?) requests blocked\lwhile bitmap is exchanged"
WFBitMapT [ label=WFBitMapT ]
WFSyncUUID [ label=WFSyncUUID ]
WFBitMapS [ label=WFBitMapS ]
}
node [fontcolor=blue]
cluster_resync [ shape=record,label="{<any>resynchronisation process running\l'concurrent' application requests allowed|{{<T>PausedSyncT\nSyncTarget}|{<S>PausedSyncS\nSyncSource}}}" ]
node [shape=box,fontcolor=black]
// drbdadm [label="drbdadm connect"]
// handshake [label="drbd_connect()\ndrbd_do_handshake\ndrbd_sync_handshake() etc."]
// comm_error [label="communication trouble"]
//
// edges
// --------------------------------------
StandAlone -> Unconnected [ label="drbdadm connect" ]
Unconnected -> StandAlone [ label="drbdadm disconnect\lor serious communication trouble" ]
Unconnected -> WFConnection [ label="receiver thread is started" ]
WFConnection -> WFReportParams [ headlabel="accept()\land/or \lconnect()\l" ]
WFReportParams -> StandAlone [ label="during handshake\lpeers do not agree\labout something essential" ]
WFReportParams -> Connected [ label="data identical\lno sync needed",color=green,fontcolor=green ]
WFReportParams -> WFBitMapS
WFReportParams -> WFBitMapT
WFBitMapT -> WFSyncUUID [minlen=0.1,constraint=false]
WFBitMapS -> cluster_resync:S
WFSyncUUID -> cluster_resync:T
edge [color=green]
cluster_resync:any -> Connected [ label="resnyc done",fontcolor=green ]
edge [color=red]
WFReportParams -> CommTrouble
Connected -> CommTrouble
cluster_resync:any -> CommTrouble
edge [color=black]
CommTrouble -> Unconnected [label="receiver thread is stopped" ]
}
요약·해설
drbd-connection-state-overview.dot:1-85DRBD가 독립 상태에서 연결 협상과 비트맵 교환·재동기화를 거쳐 정상 연결되거나 통신 장애 뒤 재연결을 준비하는 전체 상태 전이를 설명하는 DOT 도식입니다.
핵심은 연결 협상과 데이터 동기화를 분리해 보는 것입니다. 연결 조건이 맞으면 데이터 동일성에 따라 즉시 `Connected`가 되거나 비트맵 교환과 재동기화를 수행하며, 어느 주요 단계에서든 통신 손실이 발생하면 `CommTrouble`을 거쳐 `Unconnected`로 돌아갑니다.