remove shard

Removes one or more shards from the sharded database.

Syntax

remove shard {-shard {shard_name_list | ALL} | 
                 -shardspace shardspace_list | 
                 -shardgroup shardgroup_list}
             [-force] 

Options

Table 2-82 GDSCTL remove shard Options

Option Description
-shard {shard_name_list | ALL}

Specify a comma-delimited list of shard names to remove, or specify ALL to remove all shards from the catalog.

-shardspace shardspace_list

Specify a comma-delimited list of names of shardspaces from which to remove all shards.

-shardgroupshardgroup_list

Specify a comma-delimited list of names of shardgroups from which to remove all shards.

-force

Remove one or more specified shards, even if they are inaccessible and/or contain chunks. It might result in a lower number of replicas or total unavailability for a certain range of data.

WARNING:

No chunks are moved before removing the shard which may result in data loss.

WARNING:

Forced removal of a shard will also cause the removal of all shards that are replicas of the shard being forcibly removed.

Examples

Remove the shards from shardgroup GROUP1.

GDSCTL> remove shard –shardgroup group1