翻译或纠错本页面

Change Sharded Cluster to WiredTiger

3.0 新版功能: The WiredTiger storage engine is available. Also, sharded clusters may have individual shards with different storage engine configurations.

在 3.2 版更改: WiredTiger is the new default storage engine for MongoDB.

This tutorial gives an overview of changing the storage engines of a component of a sharded cluster to WiredTiger.

Considerations

This procedure may involve downtime, especially if one or more of your shards is a standalone. If you change the host or port of any shard, you must update the shard configuration as well.

You must be using MongoDB version 3.0 or greater in order to use the WiredTiger storage engine. If upgrading from an earlier version of MongoDB, see the guides on Upgrading to MongoDB 3.0 or Upgrading to MongoDB 3.2 before proceeding with changing your storage engine.

Before enabling the new WiredTiger storage engine, ensure that all replica set/sharded cluster members are running at least MongoDB version 2.6.8, and preferably version 3.0.0 or newer.

Change Shards to WiredTiger

注解

A sharded cluster can have mixed storage engines for its individual shards.

To change the storage engine for the shards to WiredTiger, refer to the appropriate procedure for each shard:

Change Config Servers to WiredTiger

To change the storage engines of the config servers of a sharded cluster, see Change Config Servers to WiredTiger.

You may safely continue to use MMAPv1 for the config servers even if one or more shards in the sharded cluster are using the WiredTiger storage engine. If you do choose to update the config servers to use WiredTiger, you must update all three.