Replace a rank when metadata is lost
(A problem exists whereby the number of ranks increments every time the metadata stored on a rank’s SCM is lost. The cause of the problem is that the rank-UUID mapping in the MS is fixed and so when the old UUID is lost we can no longer map the engine to that rank.
The problem scenario is illustrated as follows:
A PMem module fails and metadata stored on SCM is lost, the rank gets excluded and the targets distributed to other ranks. From then on that rank will always be marked as excluded in the system query output because the UUID mapped to it is no longer known to the engine.
The engine’s storage needs to be reformatted once the faulty PMem module has been replaced and both AppDirect region and
/dev/pmemnamespace recreated. The new engine then joins as a different rank (mapped to a new UUID).We then use pool extend to add the new rank to the pool as the old rank cannot be used.
The main disadvantages related to the increase in the number of pool ranks over time are:
The system query dmg output becomes unusable because it gets hard to discern new temporal excluded ranks from those that have been “lost” due to hardware failures.
Pool-map growth results in metadata size bloat which will eventually make the system sluggish.
Pool-queries will report disabled targets related to “lost” ranks making it hard for administrators to tell if pools are healthy or degraded.
The solution to the aforementioned problem is to add the capability to replace a rank by updating the UUID used to map it rather than having to create a new one. This enables the same engine to rejoin a system with it’s previous rank identifier after a PMem replacement.
The new process for replacing a rank in this case requires the dmg storage format --replace flag to be passed during SCM format. The following example emulates the erasure of storage that would occur with recreation of AppDirect interleaved mode and PMem namespace after bad NVDIMM replacement.
Use
dmg storage scan -vto identify the NUMA/Socket ID of rank to stop.
[daos]$ dmg storage scan -v -i -l wolf-312
--------
wolf-312
--------
HugePage Size: 2048 KB
SCM Namespace Socket Capacity
------------- ------ --------
pmem0 0 1.1 TB
pmem1 1 1.1 TB
NVMe PCI Model FW Revision Socket Capacity Role(s) Rank
-------- ----- ----------- ------ -------- ------- ----
0000:5e:00.0 MO0800KEFHP 4IFDHPK3 0 800 GB NA 3
0000:5f:00.0 MO0800KEFHP 4IFDHPK2 0 800 GB NA 3
0000:d8:00.0 MO0800KEFHP 4IFDHPK3 1 800 GB NA 4
0000:d9:00.0 INTEL SSDPE2MD800G4 8DV10160 1 800 GB NA 4Stop "bad" rank 4.
[daos]$ dmg -i system stop --ranks 4
Rank Operation Result
---- --------- ------
4 stop OK
[daos]$ dmg system query -iv
Rank UUID Control Address Fault Domain State Reason
---- ---- --------------- ------------ ----- ------
0 2df0f221-7386-4a46-b6f5-d5c4a1b4586d 10.8.3.98:10001 /wolf-310 Joined
1 28317976-f7b8-409f-afcf-a1bc1749e9e6 10.8.3.99:10001 /wolf-311 Joined
2 caf6907d-5225-41d6-b930-ab6d84c6e977 10.8.3.98:10001 /wolf-310 Joined
3 a10e7d76-6e36-4ad4-8258-d02cdb9e11cc 10.8.3.100:10001 /wolf-312 Joined
4 3a5b6704-30fe-4cb5-af2f-491c51547df8 10.8.3.100:10001 /wolf-312 Stopped system stop
5 f3070206-3090-49bd-8098-e13023f0ae07 10.8.3.99:10001 /wolf-311 JoinedStop remote daos_server that is running rank 4. (This would be done as part of PMem NVDIMM replacement). Observe rank 3 and 4 are both excluded.
[daos]$ ssh wolf-312 "ps ax| grep daos_server"
1526220 pts/0 Sl+ 0:03 daos_server start -i -o ~/configs/daos_server_wolf310_pmem.yml
1542966 pts/0 SLl+ 104:30 daos_engine -t 8 -x 1 -g daos_server -d /var/run/daos_server -T 2 -n /mnt/daos0/daos_nvme.conf -p 0 -I 0 -r 8192 -H 2 -s /mnt/daos0
1547610 ? Ss 0:00 bash -c ps ax| grep daos_server
1547640 ? S 0:00 grep daos_server
[daos]$ ssh wolf-312 "kill 1526220"
[daos]$ ssh wolf-312 "ps ax| grep daos_server"
1547758 ? Ss 0:00 bash -c ps ax| grep daos_server
1547788 ? S 0:00 grep daos_server
[daos]$ dmg system query -iv
Rank UUID Control Address Fault Domain State Reason
---- ---- --------------- ----------- ----- ------
0 2df0f221-7386-4a46-b6f5-d5c4a1b4586d 10.8.3.98:10001 /wolf-310.wolf Joined
1 28317976-f7b8-409f-afcf-a1bc1749e9e6 10.8.3.99:10001 /wolf-311.wolf Joined
2 caf6907d-5225-41d6-b930-ab6d84c6e977 10.8.3.98:10001 /wolf-310.wolf Joined
3 a10e7d76-6e36-4ad4-8258-d02cdb9e11cc 10.8.3.100:10001 /wolf-312.wolf Excluded
4 3a5b6704-30fe-4cb5-af2f-491c51547df8 10.8.3.100:10001 /wolf-312.wolf Excluded system stop
5 f3070206-3090-49bd-8098-e13023f0ae07 10.8.3.99:10001 /wolf-311.wolf JoinedWipe pmem device on remote storage server engine with rank 4. (Emulating PMem NVDIMM replacement)
// Workaround involving manually removing lock files required because 'dmg system stop --ranks' now uses SIGKILL by default.
[daos]$ ssh wolf-312 "sudo umount /mnt/daos1 && sudo wipefs -a /dev/pmem1 && sudo rm /var/tmp/spdk_pci_lock_0000\:d[89]*"
/dev/pmem1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
[daos]$ ssh wolf-312 "sudo wipefs /dev/pmem1"
[daos]$Start remote daos_server that was running rank 4. Observe rank 3 joins successfully.
[daos]$ ssh wolf-312 "daos_server start -i -o ~/configs/daos_server_wolf310_pmem.yml &" >/dev/null3
[daos]$ dmg system query -iv
Rank UUID Control Address Fault Domain State Reason
---- ---- --------------- ----------- ----- ------
0 2df0f221-7386-4a46-b6f5-d5c4a1b4586d 10.8.3.98:10001 /wolf-310.wolf Joined
1 28317976-f7b8-409f-afcf-a1bc1749e9e6 10.8.3.99:10001 /wolf-311.wolf Joined
2 caf6907d-5225-41d6-b930-ab6d84c6e977 10.8.3.98:10001 /wolf-310.wolf Joined
3 a10e7d76-6e36-4ad4-8258-d02cdb9e11cc 10.8.3.100:10001 /wolf-312.wolf Joined
4 3a5b6704-30fe-4cb5-af2f-491c51547df8 10.8.3.100:10001 /wolf-312.wolf Excluded system stop
5 f3070206-3090-49bd-8098-e13023f0ae07 10.8.3.99:10001 /wolf-311.wolf JoinedRun
dmg storage format --replace -l wolf-312to re-join rank 4. (Note single hostname specifier compulsory when using the replace flag). Observe rank 4 joins successfully (and no new rank entry is added).
[daos]$ install/bin/dmg storage format --replace -l wolf-312 -v -i
--------
wolf-312
--------
SCM Mount Format Result
--------- -------------.
/mnt/daos0 SCM is already formatted
/mnt/daos1 CTL_SUCCESS
NVMe PCI Format Result Role(s)
-------- ------------- -------
0000:d8:00.0 CTL_SUCCESS NA
0000:d9:00.0 CTL_SUCCESS NA
[daos]$ install-rocky/bin/dmg system query -iv
Rank UUID Control Address Fault Domain State Reason
---- ---- --------------- ------------ ----- ------
0 0bbbfbff-73b3-4d18-a7d5-3ee10ae7ed11 10.8.3.98:10001 /wolf-310.wolf Joined
1 4037ee5c-f7e8-46b7-92a7-ae94402973b6 10.8.3.99:10001 /wolf-311.wolf Joined
2 b5dc7ff2-dbdc-489b-bf03-9dc4208596f5 10.8.3.98:10001 /wolf-310.wolf Joined
3 78234378-f946-438b-9486-62837adbe103 10.8.3.100:10001 /wolf-312.wolf Joined
4 30e904da-b327-4406-8ae9-7351d955c449 10.8.3.100:10001 /wolf-312.wolf Joined
5 9bdb2d63-dc33-4a6d-88da-8839b64a4f9c 10.8.3.99:10001 /wolf-311.wolf Joined
As a note, the control log entries for processing of "replace" join request contain a pool-query for each pool relevant to the replaced rank in order to verify it’s excluded from every pool before updating its UUID in the system membership.
DEBUG 2025/03/24 17:48:49.610711 mgmt_svc.go:376: processing 1 *mgmt.JoinReq requests
DEBUG 2025/03/24 17:48:49.610793 mgmt_system.go:323: setting fault domain labels for the first time: []
DEBUG 2025/03/24 17:48:49.612164 instance_drpc.go:86: dRPC to index 0 (rank 0): PoolQuery/59B/1.006215ms
TRACE 2025/03/24 17:48:49.612353 mgmt_system.go:1172: query on pool bill (getEnabled=true) returned rankset "[0-2,5]"
TRACE 2025/03/24 17:48:49.612393 mgmt_system.go:1216: pool-service detected: id bill, ranks 0-2,5
DEBUG 2025/03/24 17:48:49.613298 instance_drpc.go:86: dRPC to index 0 (rank 0): PoolQuery/59B/610.471µs
TRACE 2025/03/24 17:48:49.613609 mgmt_system.go:1172: query on pool bob (getEnabled=true) returned rankset "[0-2,5]""
TRACE 2025/03/24 17:48:49.613686 mgmt_system.go:1216: pool-service detected: id bob, ranks 0-2,5
DEBUG 2025/03/24 17:48:49.613740 mgmt_system.go:1230: pool-ranks to operate on: map[]
DEBUG 2025/03/24 17:48:49.614055 membership.go:207: replace-rank: updating member with UUID 20fb8c6e-7192-4899-818d-2f91b5064837->30e904da-b327-4406-8ae9-7351d955c449
DEBUG 2025/03/24 17:48:49.614298 raft.go:457: member 4:1d9da9054aec0000 updated @ 2025-03-24T17:48:49.614+00:00
DEBUG 2025/03/24 17:48:49.614680 raft.go:457: member 4:1d9da9054aec0000 updated @ 2025-03-24T17:48:49.614+00:00
DEBUG 2025/03/24 17:48:49.614817 mgmt_system.go:264: updated system member: rank 4, primary uri ofi+tcp;ofi_rxm://10.8.3.100:32416, secondary uris [], Excluded->Joined
DEBUG 2025/03/24 17:48:49.615001 mgmt_svc.go:287: requesting immediate group update after join(s)
DEBUG 2025/03/24 17:48:49.615343 interceptors.go:291: gRPC response for *mgmt.JoinReq: *mgmt.JoinResp rank:4 (state:IN, local:false) map:29 (elapsed: 114.382319ms)Reintegrate ranks back into their previous pools. (Note that
dmg system reint --ranks 3-4can be replaced bydmg system reint --host-ranks wolf-312to select the ranks resident on a given storage host)
[daos]$ dmg -i pool query bill -e
Pool 2b7255ee-c1a2-49dd-bec8-317e6aee8f50, ntarget=48, disabled=16, leader=1, version=35, state=Degraded
Pool health info:
Enabled ranks: 0-2,5
Disabled ranks: 3-4
Rebuild done, 0 objs, 0 recs
Pool space info:
Target count:32
...
[daos]$ install-rocky/bin/dmg -i pool query bob -e
Pool 35e8b4e7-f656-4407-9cd3-da0cc5a78ed7, ntarget=48, disabled=16, leader=2, version=35, state=Degraded
Pool health info:
Enabled ranks: 0-2,5
Disabled ranks: 3-4
Rebuild done, 0 objs, 0 recs
Pool space info:
Target count:32
...
[daos]$ install-rocky/bin/dmg -i system reint --ranks 3-4
Pool Ranks Result Reason
---- ----- ------ ------
bill 3-4 OK -
bob 3-4 OK -
[daos]$ install-rocky/bin/dmg -i pool query bill -e
Pool 2b7255ee-c1a2-49dd-bec8-317e6aee8f50, ntarget=48, disabled=0, leader=1, version=53, state=Ready
Pool health info:
Enabled ranks: 0-5
Rebuild busy, 0 objs, 0 recs
Pool space info:
Target count:48
...
[daos]$ install-rocky/bin/dmg -i pool query bob -e
Pool 35e8b4e7-f656-4407-9cd3-da0cc5a78ed7, ntarget=48, disabled=0, leader=2, version=71, state=Ready
Pool health info:
Enabled ranks: 0-5
Rebuild busy, 0 objs, 0 recs
Pool space info:
Target count:48
...
Notes:
Restriction exists in control-plane format logic that prevents a rank which resides on any MS replica (list specified in server config file
ms_replicasparameter) host/storage-server from being replaced in this manner. Storage format command will return an error stating that “storage format invoked on a running system”. Reference: https://daosio.atlassian.net/browse/DAOS-17385In certain situations both ranks on a dual-engine server need to be replaced, if they are both in the correct state (i.e. PMem wiped and engine spec matches an entry in the MS-db) then both engines will rejoin with pre-existing ranks and output will look something like:
[daos]$ install/bin/dmg storage format --replace -l wolf-312 -v -------- wolf-312 -------- SCM Mount Format Result --------- ------------- /mnt/daos0 CTL_SUCCESS /mnt/daos1 CTL_SUCCESS ...