cubefs/docs/source/dev-guide/admin-api/master/meta-partition.md
chihe 189c7dd946 feat(doc): update doc for v3.4.0
Signed-off-by: chihe <chihe@oppo.com>
2024-10-30 17:36:30 +08:00

1.9 KiB
Executable File

Metadata Shard Management

Create

curl -v "http://192.168.0.1:17010/metaPartition/create?count=10&name=test"

Batch create meta partitions.

Parameter List

Parameter Type Description
name string Volume name
count uint64 Number of newly added mp

Query

curl -v "http://192.168.0.1:17010/metaPartition/get?id=1" | python -m json.tool

Displays detailed information about the metadata shard, including the shard ID, the starting range of the shard, etc.

Parameter List

Parameter Type Description
id uint64 Metadata shard ID

Response Example

{
    "PartitionID": 1,
    "Start": 0,
    "End": 9223372036854776000,
    "MaxNodeID": 1,
    "VolName": "test",
    "Replicas": {},
    "ReplicaNum": 3,
    "Status": 2,
    "IsRecover": true,
    "Hosts": {},
    "Peers": {},
    "Zones": {},
    "MissNodes": {},
    "LoadResponse": {}
}

Decommission Replica

curl -v "http://192.168.0.1:17010/metaPartition/decommission?id=13&addr=10.196.59.202:17210"

Removes a replica of the metadata shard and creates a new replica.

Parameter List

Parameter Type Description
id uint64 Metadata partition ID
addr string Address of the replica to be removed

Compare Replica

curl -v "http://192.168.0.1:17010/metaPartition/load?id=1"

Sends a task to compare the replica to each replica, and then checks whether the CRC of each replica is consistent.

Parameter List

Parameter Type Description
id uint64 Metadata partition ID