Skip to content

Commit 12c2f3a

Browse files
committed
Make revisions from Tom's review.
Doc-only: true Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com> Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
1 parent eabee59 commit 12c2f3a

2 files changed

Lines changed: 124 additions & 46 deletions

File tree

docs/admin/rebuild_controls.md

Lines changed: 122 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Although the self-healing policy can control whether a rebuild will occur,
66
occasionally an administrator may need to stop a rebuild already started and
7-
restart it later with a "rebuild start" command (or, perform an alternate
7+
restart it later with a `rebuild start` command (or, perform an alternate
88
action/rebuild such as direct reintegration). For this purpose, DAOS provides
99
the following interactive rebuild control command-line interfaces:
1010

@@ -13,14 +13,14 @@ the following interactive rebuild control command-line interfaces:
1313
* `dmg system rebuild stop [--force]`
1414
* `dmg system rebuild start`
1515

16-
The system commands will apply to all pools in the DAOS system (i.e., have the
17-
same effect as if multiple `pool rebuild stop` commands are issued, one per
18-
pool).
16+
The system-level commands (e.g., `dmg system rebuild stop`) apply to all pools in the DAOS
17+
system (i.e., they have the same effect as if multiple `dmg pool rebuild stop` commands are issued,
18+
one per pool).
1919

2020
Upon stopping a pool's rebuild, its rebuild state as reported by `dmg pool query`
21-
will be an idle state, and an error status=-2027 (`-DER_OP_CANCELED` DAOS error code).
21+
will be an idle state, and an error status=`-2027` (`-DER_OP_CANCELED` DAOS error code).
2222

23-
The effect of a rebuild stop command is "one shot", meaning only a pool's
23+
The effect of a `rebuild stop` command is "one shot", meaning only a pool's
2424
currently-running rebuild is stopped and there is no persistent effect on future
2525
operations. Subsequent self-healing automatic recovery, or administrator command
2626
(e.g., system stop, system/pool exclude, reintegrate, drain, pool extend) can
@@ -59,16 +59,16 @@ For a **failed rebuild**, the sequence is:
5959

6060
1. Run `op:Rebuild`
6161
2. Run `op:Fail_reclaim` to clean up
62-
* If `Fail_reclaim` failed, retry `Fail_reclaim`
62+
* If `Fail_reclaim` *itself* failed, retry `Fail_reclaim`
6363
* If `Fail_reclaim` succeeded, retry the original `op:Rebuild`
6464

65-
The "rebuild stop" commands are not typically allowed to terminate a rebuild in
65+
The `rebuild stop` commands are not typically allowed to terminate a rebuild in
6666
the `op:Reclaim` and `op:Fail_reclaim` phases — instead the command must be
6767
issued during the `op:Rebuild` execution. An exception is available with the
68-
`--force` option to "rebuild stop", intended to be applied for rebuilds that
68+
`--force` option to `rebuild stop`, intended to be applied for rebuilds that
6969
repeatedly fail and possibly may even be looping `Fail_reclaim` operations.
7070

71-
Because of these details, carefully timing the execution of "rebuild stop"
71+
Because of these details, carefully timing the execution of `rebuild stop`
7272
commands is needed, which can be facilitated with pool rebuild state querying
7373
with `dmg pool query`. See the section
7474
[Rebuild Stop Command Errors](#rebuild-stop-command-errors) for examples of
@@ -77,15 +77,18 @@ errors returned by "rebuild stop" in different timing circumstances.
7777

7878
## Example Usage: Stop a Single Pool Rebuild, then Direct Reintegration
7979

80-
A system has detected the loss of an engine (rank 3) and has launched a
81-
corresponding rebuild on pool `p1` for that exclusion. The administrator decides
82-
in this case that it is preferable to stop the exclude rebuild rather than let
83-
it finish (perhaps it is possible to quickly remedy the rank 3 engine issue,
84-
restart it, and directly reintegrate it back into the system and pool — rather
85-
than perform 2 separate rebuilds for the exclusion and the reintegration).
80+
A system has detected the loss of an engine (rank 3) that has 8 storage targets.
81+
A corresponding rebuild has launched on pool `p1` after the engine's exclusion
82+
from the pool map. The administrator decides to stop this rebuild
83+
(perhaps because it is possible to quickly remedy the rank 3 engine issue, restart it,
84+
and reintegrate it into the system and pool). This will result in a single
85+
rebuild for the reintegration, rather than two rebuilds (for the initial exclusion,
86+
and later for the reintegration).
8687

8788
**1.** Observe the pool `p1` is rebuilding after the fault is detected.
8889

90+
The pool state reflects 8 disabled targets (`disabled=8`) corresponding to the exclusion
91+
of engine rank 3. Rebuild is underway (`busy` rebuild state).
8992
```bash
9093
$ dmg pool query --health-only p1
9194
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=8, leader=6, version=77, state=TargetsExcluded
@@ -95,37 +98,42 @@ Pool health info:
9598
- Data redundancy: degraded
9699
```
97100

98-
**2.** Stop the rebuild and monitor with pool query until the stop is confirmed
99-
("stopped", state=idle, status=-2027). Notice some pool query rebuild state
100-
changes while waiting.
101+
**2.** Stop the rebuild and monitor with multiple `pool query` commands until the stop is confirmed
102+
(`stopped, state=idle, status=-2027`). Notice some rebuild state changes while waiting.
101103

104+
Using a command at single-pool scope, no output is expected if the request is successfully
105+
sent to the storage system.
102106
```bash
103107
$ dmg pool rebuild stop p1
104108
```
105109

106-
Run `dmg pool query` in a loop (with short sleeps between commands):
110+
Run `dmg pool query` in a loop (with short delays between commands).
107111

112+
The rebuild state output `stopping` along with `state=busy` and `status=-2027` is an indication
113+
that the stop command is being processed, and rebuild has not been entirely stopped yet.
108114
```bash
109-
# confirmation that stop command is being handled
110115
$ dmg pool query --health-only p1
111116
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=8, leader=6, version=77, state=TargetsExcluded
112117
Pool health info:
113118
- Disabled ranks: 3
114119
- Rebuild stopping (state=busy, status=-2027)
115120
```
116121

122+
The rebuild state has temporarily transitioned to `busy`, reflecting that the `op:Rebuild` is no
123+
longer running, but a reclaim phase is now running (in this case, `op:Fail_reclaim`, since a stopped
124+
rebuild is processed in the same way as a failed rebuild).
117125
```bash
118-
# state temporarily changes back to busy, representing the Fail_reclaim stage
119-
# for the stopped operation is now running
120126
$ dmg pool query --health-only p1
121127
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=8, leader=6, version=77, state=TargetsExcluded
122128
Pool health info:
123129
- Disabled ranks: 3
124130
- Rebuild busy, 0 objs, 0 recs
125131
```
126132

133+
The rebuild `op:Fail_reclaim` has finished, and now the pool query output shows that the
134+
rebuild is stopped. This is the final state reflecting that the rebuild is stopped
135+
(`state=idle, status=-2027`).
127136
```bash
128-
# Fail_reclaim has finished, and now the pool shows its rebuild has fully stopped
129137
$ dmg pool query --health-only p1
130138
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=8, leader=6, version=77, state=TargetsExcluded
131139
Pool health info:
@@ -134,16 +142,33 @@ Pool health info:
134142
- Data redundancy: degraded
135143
```
136144

137-
**3.** Directly reintegrate the engine back into pool `p1` and monitor progress
138-
with multiple pool query commands until the reintegration rebuild is
139-
successfully finished.
145+
**3.** Restart engine rank 3, wait for it to join the system, directly reintegrate it
146+
back into pool `p1`, and wait for the rebuild to finish successfully.
140147

141148
```bash
149+
$ dmg system start --ranks=3
150+
# Repeat dmg system query commands until engine rank 3 shown in the joined state
151+
$ dmg system query
152+
Rank State
153+
---- -----
154+
[0-2,4-7] Joined
155+
3 Stopped
156+
157+
$ dmg system query
158+
Rank State
159+
---- -----
160+
[0-7] Joined
161+
162+
# Now, reintegrate engine rank 3 into pool p1
142163
$ dmg pool reintegrate --ranks=3 p1
143164
```
144165

145-
Run `dmg pool query` in a loop (with short sleeps between commands):
166+
Run `dmg pool query` in a loop (with short delays between commands).
146167

168+
First, it may be seen that the pool map has been updated for the reintegrating engine rank 3
169+
(pool map `version=85` instead of 77, and targets `disabled=0` instead of 8). And it could be
170+
that the pool rebuild has not yet started, with state reflecting the same state following
171+
the previous (stopped) rebuild (`state=idle, status=-2027`).
147172
```bash
148173
$ dmg pool query --health-only p1
149174
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=0, leader=6, version=85, state=Ready
@@ -152,6 +177,7 @@ Pool health info:
152177
- Data redundancy: normal
153178
```
154179

180+
Rebuild is now `busy` (performing the reintegration) according to rebuild state.
155181
```bash
156182
$ dmg pool query --health-only p1
157183
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=0, leader=6, version=85, state=Ready
@@ -160,6 +186,7 @@ Pool health info:
160186
- Data redundancy: normal
161187
```
162188

189+
Rebuild is still `busy`, showing increasing object / record counts.
163190
```bash
164191
$ dmg pool query --health-only p1
165192
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=0, leader=6, version=85, state=Ready
@@ -168,15 +195,20 @@ Pool health info:
168195
- Data redundancy: normal
169196
```
170197

198+
Rebuild is still `busy`, though object / record counts have been reset. Also, the pool map version
199+
has increased to 93 (previously 85). This indicates the `op:Rebuild` has completed, and
200+
the rebuild is cleaning up in `op:Reclaim` phase. The pool map was updated to promote the
201+
engine rank 3 targets from `UP` (during reintegration) to `UP_IN` (reintegration complete,
202+
ready for client I/O).
171203
```bash
172-
# Notice zero objs, recs corresponds to a transition from Rebuild done to Reclaim phase now running.
173204
$ dmg pool query --health-only p1
174205
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=0, leader=6, version=93, state=Ready
175206
Pool health info:
176207
- Rebuild busy, 0 objs, 0 recs
177208
- Data redundancy: normal
178209
```
179210

211+
Rebuild is still `busy` in `op:Reclaim` phase.
180212
```bash
181213
$ dmg pool query --health-only p1
182214
Pool cdf27ec1-ed97-4aa6-a766-39a2ed2136a1, ntarget=64, disabled=0, leader=6, version=93, state=Ready
@@ -185,6 +217,8 @@ Pool health info:
185217
- Data redundancy: normal
186218
```
187219

220+
Rebuild (including reclaim) has finished since state is `done`. Engine rank 3 has been reintegrated
221+
into the pool.
188222
```bash
189223
# all done
190224
$ dmg pool query --health-only p1
@@ -214,9 +248,25 @@ Rank State
214248
3 Stopped
215249
```
216250

217-
This shows that pool `p2` has started its rebuild (state "busy"). `p1` is
218-
"done" from a prior rebuild, and will start rebuilding soon.
251+
Attempting to stop pool rebuilds too soon (before they have actually started) will produce an error.
252+
The `dmg system rebuild stop` command reports how many pools had the request successfully
253+
issued (in this case, 0 successful pools).
254+
```bash
255+
$ dmg system rebuild stop
256+
System-rebuild stop request succeeded on 0 pools
257+
ERROR: dmg: system rebuild stop failed: pool-rebuild stop failed on pool p1: pool-rebuild stop failed: DER_NONEXIST(-1005): The specified entity does not exist, pool-rebuild stop failed on pool p2: pool-rebuild stop failed: DER_NONEXIST(-1005): The specified entity does not exist
258+
```
259+
260+
The following output shows that pool `p2` has excluded targets and rebuild has started:
261+
- `State` column shows `TargetsExcluded`
262+
- `Disabled` column reports 8 out of 64 targets are disabled, corresponding here to the lost
263+
engine rank 3 targets.
264+
- `Rebuild State` column shows `busy`
219265

266+
Also, pool `p1` has not excluded targets yet, and has not started rebuild:
267+
- `State` column is `Ready`
268+
- `Disabled` column reflects 0 targets disabled.
269+
- `Rebuild State` column is `done`, reflecting state from a previously-completed rebuild.
220270
```bash
221271
$ dmg system list-pools -v
222272
Label UUID State SvcReps SCM Size SCM Used SCM Imbalance NVME Size NVME Used NVME Imbalance Disabled UpgradeNeeded? Rebuild State
@@ -225,11 +275,22 @@ p1 cdf27ec1-ed97-4aa6-a766-39a2ed2136a1 Ready [0-1,4-6] 105 GB 37
225275
p2 dcfe63e0-e10f-464d-b18c-0915e52e048c TargetsExcluded [0-2,6-7] 49 GB 4.6 GB 62% 0 B 0 B 0% 8/64 None busy
226276
```
227277

278+
Shortly after this moment, both pools p1 and p2 should show `Rebuild State` = `busy`.
279+
228280
**2.** Stop all pool rebuilds with one command, and confirm they have stopped.
229281

282+
The successful `system rebuild stop` command will confirm that it succeeded for all (in this case 2)
283+
pools.
230284
```bash
231285
$ dmg system rebuild stop
286+
System-rebuild stop request succeeded on 2 pools
287+
```
232288

289+
When the rebuilds have been stopped, the `Rebuild State` is expected to be `idle` (seen in both
290+
`dmg system list-pools` and `dmg pool query` command output). And the rebuild status will show
291+
error status `-2027` (`-DER_OP_CANCELED` DAOS error code)
292+
293+
```bash
233294
$ dmg system list-pools -v
234295
Label UUID State SvcReps SCM Size SCM Used SCM Imbalance NVME Size NVME Used NVME Imbalance Disabled UpgradeNeeded? Rebuild State
235296
----- ---- ----- ------- -------- -------- ------------- --------- --------- -------------- -------- -------------- -------------
@@ -256,18 +317,38 @@ until finished.
256317

257318
```bash
258319
$ dmg system start --ranks=3
320+
# Repeat dmg system query commands until engine rank 3 shown in the joined state
321+
$ dmg system query
322+
Rank State
323+
---- -----
324+
[0-2,4-7] Joined
325+
3 Stopped
326+
327+
$ dmg system query
328+
Rank State
329+
---- -----
330+
[0-7] Joined
259331

260332
$ dmg system reintegrate --ranks=3
333+
```
334+
335+
Use `dmg system list-pools` or `dmg pool query` = (with short delays between commands) to
336+
monitor the reintegration rebuilds on the pools.
261337

338+
Both pools have had their target states updated due to the reintegration command, and corresponding
339+
reintegration rebuilds started, based on the `dmg system list-pools` command output:
340+
- `Disabled` column reports 0 disabled targets (was 8 targets disabled previously)
341+
- `Rebuild State` column indicates `busy` for both pools.
342+
343+
```bash
262344
$ dmg system list-pools -v
263345
Label UUID State SvcReps SCM Size SCM Used SCM Imbalance NVME Size NVME Used NVME Imbalance Disabled UpgradeNeeded? Rebuild State
264346
----- ---- ----- ------- -------- -------- ------------- --------- --------- -------------- -------- -------------- -------------
265347
p1 cdf27ec1-ed97-4aa6-a766-39a2ed2136a1 Ready [0-1,4-6] 120 GB 42 GB 28% 0 B 0 B 0% 0/64 None busy
266348
p2 dcfe63e0-e10f-464d-b18c-0915e52e048c Ready [0-2,6-7] 56 GB 4.9 GB 62% 0 B 0 B 0% 0/64 None busy
267349
```
268350

269-
Wait for rebuilds to complete:
270-
351+
Wait for rebuilds to complete (i.e., for `Rebuild State` to report `done` for both pools):
271352
```bash
272353
$ dmg system list-pools -v
273354
Label UUID State SvcReps SCM Size SCM Used SCM Imbalance NVME Size NVME Used NVME Imbalance Disabled UpgradeNeeded? Rebuild State
@@ -279,31 +360,29 @@ p2 dcfe63e0-e10f-464d-b18c-0915e52e048c Ready [0-2,6-7] 56 GB 4.9 GB 62%
279360

280361
## Rebuild Stop Command Errors
281362

282-
The rebuild stop command may return errors when it is issued at a time that it
283-
may not be able to handle the request. For example:
363+
The `rebuild stop` command may return errors when it is issued at a time that it
364+
may not be able to handle the request. The following subsections show examples.
284365

285366
### No Rebuild Currently Running
286367

287368
When no rebuild is currently running, the command will report a "nonexist"
288369
error:
289-
290370
```bash
291-
# system command applying to 2 pools
371+
# system-level command applying to two pools, both of which have not started rebuilding yet
292372
$ dmg system rebuild stop
293373
System-rebuild stop request succeeded on 0 pools
294374
ERROR: dmg: system rebuild stop failed: pool-rebuild stop failed on pool p1: pool-rebuild stop failed: DER_NONEXIST(-1005): The specified entity does not exist, pool-rebuild stop failed on pool p2: pool-rebuild stop failed: DER_NONEXIST(-1005): The specified entity does not exist
295375

296-
# single pool command
376+
# single pool scope command applied to one pool that is not currently rebuilding
297377
$ dmg pool rebuild stop p2
298378
ERROR: dmg: pool-rebuild stop failed: DER_NONEXIST(-1005): The specified entity does not exist
299379
```
300380

301-
### Rebuild Finished, Reclaim in Progress
381+
### Rebuild Finished Successfully, Reclaim in Progress
302382

303-
When the rebuild stage has successfully finished and is in its reclaim cleanup
304-
stage, `dmg` will report a busy error. For example when pools `p1` and `p2` are
383+
When the rebuild stage has successfully finished and is in its `op:Reclaim` cleanup
384+
stage, `dmg` will report a (generic) busy error. For example when pools `p1` and `p2` are
305385
both done rebuilding and in the reclaim stage:
306-
307386
```bash
308387
$ dmg system rebuild stop
309388
System-rebuild stop request succeeded on 0 pools
@@ -316,8 +395,7 @@ When the rebuild stage has finished (but failed), and is in its `Fail_reclaim`
316395
cleanup stage, `dmg` will report a no permissions error, `-DER_NO_PERM`.
317396

318397
In this scenario, the admin can wait for the rebuild to be retried, and then
319-
reissue the "rebuild stop" command:
320-
398+
reissue the `rebuild stop` command:
321399
```bash
322400
# multiple command invocations to query pool rebuild status
323401
$ dmg pool query <pool_label>

docs/admin/self_healing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ administrator using `dmg pool get-prop` / `dmg pool set-prop`.
3333

3434
The `self_heal` property describes behavior associated with self-healing and can
3535
be set at both the system and pool levels. For a given pool to perform the
36-
recovery actions (map change, rebuild), the policy needs to be enabled at both
37-
the system and per-pool level.
36+
recovery actions (map change due to excluded engine/targets, and rebuild), the policy
37+
needs to be enabled at both the system and per-pool level.
3838

3939
The system level property has flags `exclude;pool_exclude;pool_rebuild` which
4040
indicate the following:

0 commit comments

Comments
 (0)