ANNOUNCEMENT: Voyage AI joins MongoDB to power more accurate and trustworthy AI applications on Atlas.
Learn more
Docs Menu

자체 관리형 독립형을 WiredTiger 로 변경

참고

WiredTiger로 업그레이드해야 합니다. MongoDB는 버전 4.2에서 더 이상 사용되지 않는 MMAPv1 스토리지 엔진을 제거했습니다.

Use this tutorial to change the storage engine of a 독립형 MongoDB instance to wiredTiger.

This tutorial uses the mongodump and mongorestore utilities to export and import data.

  • Ensure that these MongoDB package components are installed and updated on your system.

  • Make sure you have sufficient drive space available for the mongodump export file and the data files of your new mongod instance running with WiredTiger.

2} 및mongod mongos MongoDB localhost 바이너리는 기본적으로 에 바인딩됩니다.

The tutorial runs mongodump and mongorestore from the same host as the mongod they are connecting to. If run remotely, mongodump and mongorestore must specify the ip address or the associated hostname in order to connect to the mongod.

WiredTiger 스토리지 엔진의 경우, Linux에서는 데이터 저장 노드에 XFS를 사용하는 것이 좋습니다. 자세한 내용은 커널 및 파일 시스템을 참조하세요.

WiredTiger로 업그레이드하면 WiredTiger 배포에는 다음과 같은 MMAPv1 전용 제한 사항이 적용되지 않습니다:

MMAPv1 제한 사항
짧은 설명

네임스페이스 수

MMAPv1의 경우 네임스페이스 수는 네임스페이스 파일 크기를 628로 나눈 값으로 제한됩니다.

네임스페이스 파일 크기

MMAPv1의 경우 네임스페이스 파일은 2047메가바이트를 넘지 않아야 합니다.

데이터베이스 크기

MMAPv1 스토리지 엔진은 각 데이터베이스를 16,000개 이하의 데이터 파일로 제한합니다.

데이터 크기

MMAPv1의 경우 단일 mongod 인스턴스는 기본 운영 체제에서 제공하는 최대 가상 메모리 주소 공간을 초과하는 데이터 세트를 관리할 수 없습니다.

데이터베이스의 컬렉션 수

MMAPv1 스토리지 엔진의 경우, 데이터베이스 내 컬렉션의 최대 수는 네임스페이스 파일의 크기와 데이터베이스 내 컬렉션의 인덱스 수에 따라 결정됩니다.

1

If mongod is already running, you can skip this step.

2
mongodump --out=<exportDataDestination>

Specify additional options as appropriate, such as username and password if running with authorization enabled. See mongodump for available options.

3

Create a data directory for the new mongod instance that will run with the WiredTiger storage engine. mongod must have read and write permissions for this directory.

WiredTiger 를 사용하는 mongod 는 다른 스토리지 엔진 으로 생성된 데이터 파일로 시작되지 않습니다.

4

mongod 인스턴스 구성에서 모든 MMAPv1 구성 옵션을 제거하세요.

5

시작하기 mongod, specifying wiredTiger as the --storageEngine and the newly created data directory for WiredTiger as the --dbpath.

필요에 따라 추가 옵션을 지정합니다(예: --bind_ip).

경고

인스턴스를 공개적으로 접근 가능한 IP 주소에 바인딩하기 전에 무단 접근으로부터 클러스터를 보호해야 합니다. 보안 권장 사항의 전체 목록은 자체 관리 배포서버에 대한 보안 검사 목록을 참조하세요. 최소한 인증을 활성화하고 네트워크 인프라를 강화하는 것을 고려합니다.

mongod --storageEngine wiredTiger --dbpath <newWiredTigerDBPath> --bind_ip localhost,<hostname(s)|ip address(es)>

구성 파일에서 옵션을 지정할 수도 있습니다. 스토리지 엔진을 지정하려면 storage.engine 설정을 사용합니다.

6
mongorestore <exportDataDestination>

Specify additional options as appropriate. See mongorestore for available options.