Merge pull request #22996 from batrick/mds-state-dot

doc: add mds state transition diagram

Reviewed-by: Greg Farnum <gfarnum@redhat.com> 
Reviewed-by:  Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Gregory Farnum 2018-07-24 14:22:08 -07:00 committed by GitHub
commit b8f079a653
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 628 additions and 24 deletions

1
doc/cephfs/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
mds-state-diagram.svg

7
doc/cephfs/Makefile Normal file
View File

@ -0,0 +1,7 @@
TARGETS=mds-state-diagram.svg
%.svg: %.dot
dot -Tsvg -o $@ $^
all: $(TARGETS)

View File

@ -1,3 +1,4 @@
.. _cephfs-administration:
CephFS Administrative commands
==============================

View File

@ -1,3 +1,4 @@
.. _cephfs-disaster-recovery:
Disaster recovery
=================

View File

@ -51,6 +51,7 @@ least one :term:`Ceph Metadata Server` running.
:maxdepth: 1
Add/Remove MDS(s) <add-remove-mds>
MDS states <mds-states>
MDS failover and standby configuration <standby>
MDS Configuration Settings <mds-config-ref>
Client Configuration Settings <client-config-ref>
@ -86,6 +87,7 @@ authentication keyring.
:maxdepth: 1
Deployment best practices <best-practices>
MDS States <mds-states>
Administrative commands <administration>
Understanding MDS Cache Size Limits <cache-size-limits>
POSIX compatibility <posix>

View File

@ -0,0 +1,71 @@
digraph {
node [shape=circle,style=unfilled,fixedsize=true,width=2.0]
node [color=blue,peripheries=1];
N0 [label="up:boot"]
node [color=orange,peripheries=2];
N1 [label="up:creating"]
N0 -> N1 [color=orange,penwidth=2.0];
N2 [label="up:starting"]
N0 -> N2 [color=orange,penwidth=2.0];
N3 [label="up:replay"]
N0 -> N3 [color=orange,penwidth=2.0];
N4 [label="up:resolve"]
N3 -> N4 [color=orange,penwidth=2.0];
N5 [label="up:reconnect"]
N3 -> N5 [color=orange,penwidth=2.0];
N4 -> N5 [color=orange,penwidth=2.0];
N6 [label="up:rejoin"]
N5 -> N6 [color=orange,penwidth=2.0];
N7 [label="up:clientreplay"]
N6 -> N7 [color=orange,penwidth=2.0];
node [color=green,peripheries=2];
S0 [label="up:active"]
N7 -> S0 [color=green,penwidth=2.0];
N1 -> S0 [color=green,penwidth=2.0];
N2 -> S0 [color=green,penwidth=2.0];
N6 -> S0 [color=green,penwidth=2.0];
node [color=green,peripheries=1];
S1 [label="up:standby"]
N0 -> S1 [color=green,penwidth=2.0];
S2 [label="up:standby_replay"]
N0 -> S2 [color=green,penwidth=2.0];
// going down but still accessible by clients
node [color=purple,peripheries=2];
S3 [label="up:stopping"]
S0 -> S3 [color=purple,penwidth=2.0];
// terminal (but "in")
node [shape=polygon,sides=6,color=red,peripheries=2];
D0 [label="down:failed"]
N2 -> D0 [color=red,penwidth=2.0];
N3 -> D0 [color=red,penwidth=2.0];
N4 -> D0 [color=red,penwidth=2.0];
N5 -> D0 [color=red,penwidth=2.0];
N6 -> D0 [color=red,penwidth=2.0];
N7 -> D0 [color=red,penwidth=2.0];
S0 -> D0 [color=red,penwidth=2.0];
S3 -> D0 [color=red,penwidth=2.0];
D0 -> N3 [color=red,penwidth=2.0];
// terminal (but not "in")
node [shape=polygon,sides=6,color=black,peripheries=1];
D1 [label="down:damaged"]
N3 -> D1 [color=black,penwidth=2.0];
N4 -> D1 [color=black,penwidth=2.0];
N5 -> D1 [color=black,penwidth=2.0];
N6 -> D1 [color=black,penwidth=2.0];
N7 -> D1 [color=black,penwidth=2.0];
S0 -> D1 [color=black,penwidth=2.0];
S3 -> D1 [color=black,penwidth=2.0];
D1 -> D0 [color=red,penwidth=2.0]
node [shape=polygon,sides=6,color=purple,peripheries=1];
D3 [label="down:stopped"]
S3 -> D3 [color=purple,penwidth=2.0];
}

View File

@ -0,0 +1,311 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: %3 Pages: 1 -->
<svg width="783pt" height="1808pt"
viewBox="0.00 0.00 783.00 1808.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1804)">
<title>%3</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-1804 779,-1804 779,4 -4,4"/>
<!-- N0 -->
<g id="node1" class="node">
<title>N0</title>
<ellipse fill="none" stroke="#0000ff" cx="375" cy="-1728" rx="72" ry="72"/>
<text text-anchor="middle" x="375" y="-1724.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:boot</text>
</g>
<!-- N1 -->
<g id="node2" class="node">
<title>N1</title>
<ellipse fill="none" stroke="#ffa500" cx="375" cy="-1544" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="375" cy="-1544" rx="76" ry="76"/>
<text text-anchor="middle" x="375" y="-1540.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:creating</text>
</g>
<!-- N0&#45;&gt;N1 -->
<g id="edge1" class="edge">
<title>N0&#45;&gt;N1</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M375,-1655.8064C375,-1647.5034 375,-1638.9744 375,-1630.5077"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="378.5001,-1630.2303 375,-1620.2304 371.5001,-1630.2304 378.5001,-1630.2303"/>
</g>
<!-- N2 -->
<g id="node3" class="node">
<title>N2</title>
<ellipse fill="none" stroke="#ffa500" cx="205" cy="-1544" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="205" cy="-1544" rx="76" ry="76"/>
<text text-anchor="middle" x="205" y="-1540.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:starting</text>
</g>
<!-- N0&#45;&gt;N2 -->
<g id="edge2" class="edge">
<title>N0&#45;&gt;N2</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M325.829,-1674.7796C306.3584,-1653.7056 283.8178,-1629.3086 263.5164,-1607.3354"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="266.082,-1604.9547 256.7251,-1599.9848 260.9405,-1609.705 266.082,-1604.9547"/>
</g>
<!-- N3 -->
<g id="node4" class="node">
<title>N3</title>
<ellipse fill="none" stroke="#ffa500" cx="98" cy="-900" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="98" cy="-900" rx="76" ry="76"/>
<text text-anchor="middle" x="98" y="-896.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:replay</text>
</g>
<!-- N0&#45;&gt;N3 -->
<g id="edge3" class="edge">
<title>N0&#45;&gt;N3</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M303.6813,-1718.116C244.3606,-1705.8591 162.9365,-1678.8371 120,-1620 50.549,-1524.8294 96,-1473.8172 96,-1356 96,-1356 96,-1356 96,-1168 96,-1107.3668 96.5182,-1039.0195 97.0271,-986.5224"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="100.5296,-986.2755 97.1286,-976.2414 93.53,-986.2063 100.5296,-986.2755"/>
</g>
<!-- S1 -->
<g id="node10" class="node">
<title>S1</title>
<ellipse fill="none" stroke="#00ff00" cx="541" cy="-1544" rx="72" ry="72"/>
<text text-anchor="middle" x="541" y="-1540.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:standby</text>
</g>
<!-- N0&#45;&gt;S1 -->
<g id="edge13" class="edge">
<title>N0&#45;&gt;S1</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M423.4603,-1674.285C443.0634,-1652.5563 465.795,-1627.3597 486.014,-1604.9483"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="488.6666,-1607.2332 492.7664,-1597.4637 483.4691,-1602.5441 488.6666,-1607.2332"/>
</g>
<!-- S2 -->
<g id="node11" class="node">
<title>S2</title>
<ellipse fill="none" stroke="#00ff00" cx="703" cy="-1544" rx="72" ry="72"/>
<text text-anchor="middle" x="703" y="-1540.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:standby_replay</text>
</g>
<!-- N0&#45;&gt;S2 -->
<g id="edge14" class="edge">
<title>N0&#45;&gt;S2</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M443.4232,-1705.2759C494.8612,-1686.5285 565.831,-1657.0318 622,-1620 629.8031,-1614.8555 637.5551,-1608.9346 644.9954,-1602.7159"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="647.6445,-1605.0534 652.9345,-1595.8736 643.0746,-1599.7509 647.6445,-1605.0534"/>
</g>
<!-- S0 -->
<g id="node9" class="node">
<title>S0</title>
<ellipse fill="none" stroke="#00ff00" cx="375" cy="-1356" rx="72" ry="72"/>
<ellipse fill="none" stroke="#00ff00" cx="375" cy="-1356" rx="76" ry="76"/>
<text text-anchor="middle" x="375" y="-1352.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:active</text>
</g>
<!-- N1&#45;&gt;S0 -->
<g id="edge10" class="edge">
<title>N1&#45;&gt;S0</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M375,-1467.8042C375,-1459.4826 375,-1450.9678 375,-1442.5337"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="378.5001,-1442.3042 375,-1432.3043 371.5001,-1442.3043 378.5001,-1442.3042"/>
</g>
<!-- N2&#45;&gt;S0 -->
<g id="edge11" class="edge">
<title>N2&#45;&gt;S0</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M256.0056,-1487.5938C275.1652,-1466.4055 297.0838,-1442.1662 316.8451,-1420.3125"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="319.6258,-1422.4558 323.7368,-1412.691 314.4337,-1417.7608 319.6258,-1422.4558"/>
</g>
<!-- D0 -->
<g id="node13" class="node">
<title>D0</title>
<polygon fill="none" stroke="#ff0000" points="276.9505,-1034 240.9752,-1052 169.0248,-1052 133.0495,-1034 169.0248,-1016 240.9752,-1016 276.9505,-1034"/>
<polygon fill="none" stroke="#ff0000" points="285.8886,-1034 241.9189,-1056 168.0811,-1056 124.1114,-1034 168.0811,-1012 241.9189,-1012 285.8886,-1034"/>
<text text-anchor="middle" x="205" y="-1030.3" font-family="Times,serif" font-size="14.00" fill="#000000">down:failed</text>
</g>
<!-- N2&#45;&gt;D0 -->
<g id="edge16" class="edge">
<title>N2&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M205,-1467.9234C205,-1354.6806 205,-1146.5379 205,-1066.5209"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="208.5001,-1066.1037 205,-1056.1037 201.5001,-1066.1037 208.5001,-1066.1037"/>
</g>
<!-- N4 -->
<g id="node5" class="node">
<title>N4</title>
<ellipse fill="none" stroke="#ffa500" cx="142" cy="-712" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="142" cy="-712" rx="76" ry="76"/>
<text text-anchor="middle" x="142" y="-708.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:resolve</text>
</g>
<!-- N3&#45;&gt;N4 -->
<g id="edge4" class="edge">
<title>N3&#45;&gt;N4</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M115.3268,-825.9673C117.6174,-816.1801 119.9789,-806.0901 122.3056,-796.1487"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="125.7458,-796.8081 124.6168,-786.2736 118.93,-795.2128 125.7458,-796.8081"/>
</g>
<!-- N5 -->
<g id="node6" class="node">
<title>N5</title>
<ellipse fill="none" stroke="#ffa500" cx="180" cy="-524" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="180" cy="-524" rx="76" ry="76"/>
<text text-anchor="middle" x="180" y="-520.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:reconnect</text>
</g>
<!-- N3&#45;&gt;N5 -->
<g id="edge5" class="edge">
<title>N3&#45;&gt;N5</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M66.8389,-830.5319C46.9319,-775.6268 29.5354,-698.153 57,-636 68.0235,-611.0535 87.6518,-589.2711 108.0365,-571.7132"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="110.423,-574.2805 115.8697,-565.193 105.9448,-568.9004 110.423,-574.2805"/>
</g>
<!-- N3&#45;&gt;D0 -->
<g id="edge17" class="edge">
<title>N3&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M149.6142,-956.282C162.8016,-972.5015 176.1362,-989.5814 186.4752,-1003.5856"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="183.7873,-1005.8407 192.4974,-1011.8726 189.45,-1001.7255 183.7873,-1005.8407"/>
</g>
<!-- D1 -->
<g id="node14" class="node">
<title>D1</title>
<polygon fill="none" stroke="#000000" points="326,-18 290,-36 218,-36 182,-18 218,0 290,0 326,-18"/>
<text text-anchor="middle" x="254" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">down:damaged</text>
</g>
<!-- N3&#45;&gt;D1 -->
<g id="edge25" class="edge">
<title>N3&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M58.9011,-834.7037C51.302,-819.7688 44.1186,-803.6682 39,-788 2.1684,-675.257 0,-642.6067 0,-524 0,-524 0,-524 0,-336 0,-208.8889 18.5148,-160.2479 110,-72 131.8215,-50.9507 162.6171,-37.9503 190.132,-29.9999"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="191.3646,-33.292 200.0979,-27.2937 189.5302,-26.5367 191.3646,-33.292"/>
</g>
<!-- N4&#45;&gt;N5 -->
<g id="edge6" class="edge">
<title>N4&#45;&gt;N5</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M157.0732,-637.4274C158.9802,-627.9927 160.9424,-618.2849 162.8783,-608.7071"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="166.3322,-609.2852 164.8829,-598.79 159.471,-607.8983 166.3322,-609.2852"/>
</g>
<!-- N4&#45;&gt;D0 -->
<g id="edge18" class="edge">
<title>N4&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M170.8211,-782.5993C175.5042,-796.1615 179.8456,-810.3838 183,-824 197.3463,-885.9266 202.3514,-960.3122 204.0876,-1001.8649"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="200.5932,-1002.0802 204.4707,-1011.94 207.5881,-1001.8142 200.5932,-1002.0802"/>
</g>
<!-- N4&#45;&gt;D1 -->
<g id="edge26" class="edge">
<title>N4&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M108.3518,-643.7605C102.8165,-629.615 97.934,-614.574 95,-600 81.6674,-533.7732 87.5907,-515.148 95,-448 113.78,-277.8024 84.6917,-214.919 179,-72 186.8932,-60.0384 198.4086,-49.85 210.0577,-41.6536"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="212.1179,-44.487 218.5139,-36.0405 208.2466,-38.6549 212.1179,-44.487"/>
</g>
<!-- N6 -->
<g id="node7" class="node">
<title>N6</title>
<ellipse fill="none" stroke="#ffa500" cx="334" cy="-336" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="334" cy="-336" rx="76" ry="76"/>
<text text-anchor="middle" x="334" y="-332.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:rejoin</text>
</g>
<!-- N5&#45;&gt;N6 -->
<g id="edge7" class="edge">
<title>N5&#45;&gt;N6</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M228.304,-465.0314C244.4236,-445.353 262.5011,-423.2844 279.0854,-403.0386"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="281.9735,-405.0361 285.6028,-395.0823 276.5583,-400.6003 281.9735,-405.0361"/>
</g>
<!-- N5&#45;&gt;D0 -->
<g id="edge19" class="edge">
<title>N5&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M213.6482,-592.2395C219.1835,-606.385 224.066,-621.426 227,-636 253.9006,-769.6228 226.3843,-933.2287 212.2624,-1001.5818"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="208.7642,-1001.2075 210.1213,-1011.715 215.613,-1002.6546 208.7642,-1001.2075"/>
</g>
<!-- N5&#45;&gt;D1 -->
<g id="edge27" class="edge">
<title>N5&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M174.0783,-447.8601C169.6026,-355.8973 170.5717,-197.8787 216,-72 219.5236,-62.2364 225.3085,-52.624 231.3143,-44.2773"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="234.2827,-46.1569 237.5673,-36.0841 228.7181,-41.91 234.2827,-46.1569"/>
</g>
<!-- N7 -->
<g id="node8" class="node">
<title>N7</title>
<ellipse fill="none" stroke="#ffa500" cx="401" cy="-148" rx="72" ry="72"/>
<ellipse fill="none" stroke="#ffa500" cx="401" cy="-148" rx="76" ry="76"/>
<text text-anchor="middle" x="401" y="-144.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:clientreplay</text>
</g>
<!-- N6&#45;&gt;N7 -->
<g id="edge8" class="edge">
<title>N6&#45;&gt;N7</title>
<path fill="none" stroke="#ffa500" stroke-width="2" d="M359.521,-264.389C363.5946,-252.9584 367.8354,-241.0588 371.9829,-229.4212"/>
<polygon fill="#ffa500" stroke="#ffa500" stroke-width="2" points="375.3789,-230.3179 375.4391,-219.7232 368.7851,-227.9679 375.3789,-230.3179"/>
</g>
<!-- N6&#45;&gt;S0 -->
<g id="edge12" class="edge">
<title>N6&#45;&gt;S0</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M374.6915,-400.4499C416.6522,-473.2042 476,-596.5177 476,-712 476,-1034 476,-1034 476,-1034 476,-1127.7146 490.1099,-1156.3293 457,-1244 450.8791,-1260.2075 441.7293,-1276.1446 431.7345,-1290.685"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="428.7105,-1288.8981 425.7686,-1299.0763 434.4156,-1292.9542 428.7105,-1288.8981"/>
</g>
<!-- N6&#45;&gt;D0 -->
<g id="edge20" class="edge">
<title>N6&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M350.4852,-410.3817C374.2134,-536.5952 404.3269,-796.4598 298,-976 289.2477,-990.7789 275.1051,-1002.3467 260.4616,-1011.1304"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="258.3409,-1008.3063 251.323,-1016.2436 261.7588,-1014.4152 258.3409,-1008.3063"/>
</g>
<!-- N6&#45;&gt;D1 -->
<g id="edge28" class="edge">
<title>N6&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M315.4453,-262.2451C298.1087,-193.3322 273.1414,-94.0872 261.0685,-46.0972"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="264.3934,-44.9675 258.5594,-36.1235 257.6049,-46.6753 264.3934,-44.9675"/>
</g>
<!-- N7&#45;&gt;S0 -->
<g id="edge9" class="edge">
<title>N7&#45;&gt;S0</title>
<path fill="none" stroke="#00ff00" stroke-width="2" d="M443.6651,-211.1162C488.3175,-283.4252 552,-407.0513 552,-524 552,-1034 552,-1034 552,-1034 552,-1132.382 532.7639,-1159.7264 482,-1244 470.3882,-1263.2768 454.9343,-1281.9188 439.391,-1298.2812"/>
<polygon fill="#00ff00" stroke="#00ff00" stroke-width="2" points="436.7092,-1296.0189 432.2566,-1305.6327 441.7326,-1300.8939 436.7092,-1296.0189"/>
</g>
<!-- N7&#45;&gt;D0 -->
<g id="edge21" class="edge">
<title>N7&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M414.0091,-223.1818C415.8671,-235.4615 417.6144,-248.0669 419,-260 432.5684,-376.8517 438,-406.3632 438,-524 438,-712 438,-712 438,-712 438,-837.0027 427.1077,-885.3846 341,-976 322.1123,-995.8765 295.3079,-1009.2638 270.482,-1018.1167"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="269.0809,-1014.8955 260.7233,-1021.4071 271.3175,-1021.5286 269.0809,-1014.8955"/>
</g>
<!-- N7&#45;&gt;D1 -->
<g id="edge29" class="edge">
<title>N7&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M343.745,-97.3664C322.6326,-78.6955 299.6377,-58.3599 282.21,-42.9476"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="284.4307,-40.2392 274.6212,-36.2364 279.7935,-45.4829 284.4307,-40.2392"/>
</g>
<!-- S3 -->
<g id="node12" class="node">
<title>S3</title>
<ellipse fill="none" stroke="#a020f0" cx="372" cy="-1168" rx="72" ry="72"/>
<ellipse fill="none" stroke="#a020f0" cx="372" cy="-1168" rx="76" ry="76"/>
<text text-anchor="middle" x="372" y="-1164.3" font-family="Times,serif" font-size="14.00" fill="#000000">up:stopping</text>
</g>
<!-- S0&#45;&gt;S3 -->
<g id="edge15" class="edge">
<title>S0&#45;&gt;S3</title>
<path fill="none" stroke="#a020f0" stroke-width="2" d="M373.7841,-1279.8042C373.6487,-1271.318 373.5101,-1262.6309 373.3729,-1254.0333"/>
<polygon fill="#a020f0" stroke="#a020f0" stroke-width="2" points="376.872,-1253.9418 373.2127,-1243.9989 369.8728,-1254.0536 376.872,-1253.9418"/>
</g>
<!-- S0&#45;&gt;D0 -->
<g id="edge22" class="edge">
<title>S0&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M324.7658,-1298.7259C311.4118,-1281.8155 297.7347,-1262.7868 287,-1244 253.0065,-1184.5078 227.1586,-1108.1765 214.2126,-1065.8585"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="217.5124,-1064.678 211.2761,-1056.113 210.8101,-1066.6976 217.5124,-1064.678"/>
</g>
<!-- S0&#45;&gt;D1 -->
<g id="edge30" class="edge">
<title>S0&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M442.7372,-1320.9248C473.4011,-1301.9277 507.694,-1275.8005 530,-1244 585.7414,-1164.5323 590,-1131.0681 590,-1034 590,-1034 590,-1034 590,-336 590,-214.8369 609.9264,-155.3634 522,-72 494.3419,-45.7772 395.9102,-31.2035 326.3899,-23.9832"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="326.6553,-20.4923 316.3544,-22.9708 325.9526,-27.4569 326.6553,-20.4923"/>
</g>
<!-- S3&#45;&gt;D0 -->
<g id="edge23" class="edge">
<title>S3&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M312.6518,-1120.3793C288.6501,-1101.1204 261.7353,-1079.5241 240.8219,-1062.7433"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="242.8216,-1059.8605 232.8316,-1056.3319 238.4408,-1065.3202 242.8216,-1059.8605"/>
</g>
<!-- S3&#45;&gt;D1 -->
<g id="edge31" class="edge">
<title>S3&#45;&gt;D1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M422.8642,-1111.3791C463.6096,-1060.0328 514,-980.2995 514,-900 514,-900 514,-900 514,-336 514,-218.0086 564.146,-160.4035 486,-72 464.8015,-48.019 384.4146,-33.2954 324.1685,-25.4019"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="324.2918,-21.8895 313.9302,-24.1001 323.4088,-28.8336 324.2918,-21.8895"/>
</g>
<!-- D3 -->
<g id="node15" class="node">
<title>D3</title>
<polygon fill="none" stroke="#a020f0" points="448,-1034 412,-1052 340,-1052 304,-1034 340,-1016 412,-1016 448,-1034"/>
<text text-anchor="middle" x="376" y="-1030.3" font-family="Times,serif" font-size="14.00" fill="#000000">down:stopped</text>
</g>
<!-- S3&#45;&gt;D3 -->
<g id="edge33" class="edge">
<title>S3&#45;&gt;D3</title>
<path fill="none" stroke="#a020f0" stroke-width="2" d="M374.2688,-1091.995C374.5847,-1081.4121 374.8915,-1071.1346 375.1569,-1062.2444"/>
<polygon fill="#a020f0" stroke="#a020f0" stroke-width="2" points="378.6578,-1062.2611 375.4579,-1052.1611 371.661,-1062.0522 378.6578,-1062.2611"/>
</g>
<!-- D0&#45;&gt;N3 -->
<g id="edge24" class="edge">
<title>D0&#45;&gt;N3</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M182.1648,-1011.8726C171.9859,-1000.3518 159.6454,-985.5549 147.5698,-970.521"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="150.2651,-968.2872 141.2921,-962.6537 144.7935,-972.6532 150.2651,-968.2872"/>
</g>
<!-- D1&#45;&gt;D0 -->
<g id="edge32" class="edge">
<title>D1&#45;&gt;D0</title>
<path fill="none" stroke="#ff0000" stroke-width="2" d="M253.4952,-36.2127C252.406,-76.5308 249.8638,-176.379 249,-260 248.3022,-327.552 234.976,-345.9161 249,-412 252.6347,-429.1277 261.3653,-430.8723 265,-448 279.024,-514.0839 267.0633,-532.476 265,-600 259.8865,-767.3454 293.786,-816.7869 242,-976 238.9016,-985.5258 233.8623,-995.035 228.4863,-1003.5163"/>
<polygon fill="#ff0000" stroke="#ff0000" stroke-width="2" points="225.4987,-1001.687 222.8293,-1011.94 231.31,-1005.5896 225.4987,-1001.687"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

227
doc/cephfs/mds-states.rst Normal file
View File

@ -0,0 +1,227 @@
MDS States
==========
The Metadata Server (MDS) goes through several states during normal operation
in CephFS. For example, some states indicate that the MDS is recovering from a
failover by a previous instance of the MDS. Here we'll document all of these
states and include a state diagram to visualize the transitions.
State Descriptions
------------------
Common states
~~~~~~~~~~~~~~
::
up:active
This is the normal operating state of the MDS. It indicates that the MDS
and its rank in the file system is available.
::
up:standby
The MDS is available to takeover for a failed rank (see also :ref:`mds-standby`).
The monitor will automatically assign an MDS in this state to a failed rank
once available.
::
up:standby_replay
The MDS is following the journal of another ``up:active`` MDS. Should the
active MDS fail, having a standby MDS in replay mode is desirable as the MDS is
replaying the live journal and will more quickly takeover. A downside to having
standby replay MDSs is that they are not available to takeover for any other
MDS that fails, only the MDS they follow.
Less common or transitory states
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
up:boot
This state is broadcast to the Ceph monitors during startup. This state is
never visible as the Monitor immediately assign the MDS to an available rank or
commands the MDS to operate as a standby. The state is documented here for
completeness.
::
up:creating
The MDS is creating a new rank (perhaps rank 0) by constructing some per-rank
metadata (like the journal) and entering the MDS cluster.
::
up:starting
The MDS is restarting a stopped rank. It opens associated per-rank metadata
and enters the MDS cluster.
::
up:stopping
When a rank is deactivated (stopped), the monitors command an active MDS to
enter the ``up:stopping`` state. In this state, the MDS accepts no new client
connections, migrates all subtrees to other ranks in the file system, flush its
metadata journal, and, if the last rank (0), evict all clients and shutdown
(see also :ref:`cephfs-administration`).
::
up:replay
The MDS taking over a failed rank. This state represents that the MDS is
recovering its journal and other metadata.
::
up:resolve
The MDS enters this state from ``up:replay`` if the Ceph file system has
multiple ranks (including this one), i.e. it's not a single active MDS cluster.
The MDS is resolving any uncommitted inter-MDS operations. All ranks in the
file system must be in this state or later for progress to be made, i.e. no
rank can be failed/damaged or ``up:replay``.
::
up:reconnect
An MDS enters this state from ``up:replay`` or ``up:resolve``. This state is to
solicit reconnections from clients. Any client which had a session with this
rank must reconnect during this time, configurable via
``mds_reconnect_timeout``.
::
up:rejoin
The MDS enters this state from ``up:reconnect``. In this state, the MDS is
rejoining the MDS cluster cache. In particular, all inter-MDS locks on metadata
are reestablished.
If there are no known client requests to be replayed, the MDS directly becomes
``up:active`` from this state.
::
up:clientreplay
The MDS may enter this state from ``up:rejoin``. The MDS is replaying any
client requests which were replied to but not yet durable (not journaled).
Clients resend these requests during ``up:reconnect`` and the requests are
replayed once again. The MDS enters ``up:active`` after completing replay.
Failed states
~~~~~~~~~~~~~
::
down:failed
No MDS actually holds this state. Instead, it is applied to the rank in the file system. For example:
::
$ ceph fs dump
...
max_mds 1
in 0
up {}
failed 0
...
Rank 0 is part of the failed set.
::
down:damaged
No MDS actually holds this state. Instead, it is applied to the rank in the file system. For example:
::
$ ceph fs dump
...
max_mds 1
in 0
up {}
failed
damaged 0
...
Rank 0 has become damaged (see also :ref:`cephfs-disaster-recovery`) and placed in
the ``damaged`` set. An MDS which was running as rank 0 found metadata damage
that could not be automatically recovered. Operator intervention is required.
::
down:stopped
No MDS actually holds this state. Instead, it is applied to the rank in the file system. For example:
::
$ ceph fs dump
...
max_mds 1
in 0
up {}
failed
damaged
stopped 1
...
The rank has been stopped by reducing ``max_mds`` (see also :ref:`cephfs-multimds`).
State Diagram
-------------
This state diagram shows the possible state transitions for the MDS/rank. The legend is as follows:
Color
~~~~~
- Green: MDS is active.
- Orange: MDS is in transient state trying to become active.
- Red: MDS is indicating a state that causes the rank to be marked failed.
- Purple: MDS and rank is stopping.
- Red: MDS is indicating a state that causes the rank to be marked damaged.
Shape
~~~~~
- Circle: an MDS holds this state.
- Hexagon: no MDS holds this state (it is applied to the rank).
Lines
~~~~~
- A double-lined shape indicates the rank is "in".
.. image:: mds-state-diagram.svg

View File

@ -1,3 +1,4 @@
.. _cephfs-multimds:
Configuring multiple active MDS daemons
---------------------------------------

View File

@ -1,3 +1,4 @@
.. _mds-standby:
Terminology
-----------

View File

@ -36,29 +36,6 @@
#include "common/Formatter.h"
#include "mds/mdstypes.h"
/*
boot --> standby, creating, or starting.
dne ----> creating -----> active*
^ ^___________/ / ^ ^
| / / |
destroying / / |
^ / / |
| / / |
stopped <---- stopping* <-/ / |
\ / |
----- starting* ----/ |
|
failed |
\ |
\--> replay* --> reconnect* --> rejoin*
* = can fail
*/
class CephContext;
class health_check_map_t;
@ -78,7 +55,11 @@ class health_check_map_t;
class MDSMap {
public:
/* These states are the union of the set of possible states of an MDS daemon,
* and the set of possible states of an MDS rank */
* and the set of possible states of an MDS rank. See
* doc/cephfs/mds-states.rst for state descriptions,
* doc/cephfs/mds-state-diagram.svg for a visual state diagram, and
* doc/cephfs/mds-state-diagram.dot to update mds-state-diagram.svg.
*/
typedef enum {
// States of an MDS daemon not currently holding a rank
// ====================================================