AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

removeShardFromZone (데이터베이스 명령)

removeShardFromZone

The removeShardFromZone administrative command removes the association between a shard and a zone.

In mongosh, this command can also be run through the sh.removeShardFromZone() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스

You can only run removeShardFromZone on the admin database from a mongos instance.

명령은 다음과 같은 구문을 가집니다:

db.adminCommand(
{
removeShardFromZone: <string>,
zone: <string>
}
)

이 명령은 다음 필드를 사용합니다.

필드
유형
설명

문자열

The name of the shard from which to remove the zone association.

문자열

The name of the zone whose association with the shard you want to remove.

mongosh provides the helper method sh.removeShardFromZone().

removeShardFromZone 구역과 관련된 범위는 제거하지 않습니다.

To completely remove a zone from the cluster, you must run removeShardFromZone on each shard associated with the zone.

If the shard specified is the last shard associated with the zone, you must ensure there are no remaining shard key ranges associated with the zone. Use updateZoneKeyRange to remove any existing ranges associated with the zone before running removeShardFromZone.

샤드 클러스터의 구역에 대한 자세한 내용은 구역 매뉴얼 페이지를 참조하세요.

액세스 제어 를 적용하는 샤드 cluster의 경우 다음 중 하나를 사용하여 인증해야 합니다.

  • 다음과 같은 권한을 가진 사용자입니다.

    • update 데이터베이스의 shards collection config 컬렉션에 대한 및

    • find config 데이터베이스의 tags collection에 대한 ,

    또는

  • 클러스터 리소스에 대한 가 enableSharding 포함된 권한을 가진 사용자입니다.

The clusterAdmin or clusterManager built-in roles have the appropriate permissions for issuing removeShardFromZone. See the Role-Based Access Control manual page for more information.

다음 예에서는 shard0000 와 구역 NYC 간의 연결을 제거합니다.

db.adminCommand( { removeShardFromZone : "shard0000" , zone : "NYC" } )
이 페이지 평가하기