MongoDB Documentation, Release 3.0.4 Convert a Cluster with a Single Shard into a Replica Set Convert a Sharded Cluster into a Replica Set 10.3.2 Sharded Cluster Maintenance Tutorials In the case of a sharded cluster with only one shard, that shard contains the full data set. Use the following procedure to convert that cluster into a non-sharded replica set : Changing the --shardsrv option will change the port that mongod listens for incoming connections on. Tip The single-shard cluster is now a non-sharded replica set that will accept read and write operations on the data set. You may now decommission the remaining sharding infrastructure. Use the following procedure to transition from a sharded cluster with more than one shard to an entirely new replica set . Note: Not all collections on all databases are necessarily sharded. Do not solely migrate the sharded collections. Ensure that all databases and all collections migrate correctly. The application will now use the un-sharded replica set for reads and writes. You may now decommission the remain- ing unused sharded cluster infrastructure. The following tutorials provide information in maintaining sharded clusters. 705 10.3. Sharded Cluster Tutorials Replace Disabled Config Server (page 709) Replaces a config server that has become inoperable. This procedure assumes that the hostname does not change. Migrate Config Servers with Different Hostnames (page 708) Migrate a config server to a new system that uses a new hostname. If possible, avoid changing the hostname and instead use the Migrate Config Servers with the Same Hostname (page 707) procedure. Migrate Config Servers with the Same Hostname (page 707) Migrate a config server to a new system while keeping the same hostname. This procedure requires changing the DNS entry to point to the new system. View Cluster Configuration (page 706) View status information about the cluster’s databases, shards, and chunks. 4. Reconfigure the application to use the non-sharded replica set instead of the mongos instance. 3. Use mongodump and mongorestore (page 249) to migrate the data from the mongos instance to the new replica set . 2. Stop all writes to the sharded cluster . You may reconfigure your application or stop all mongos instances. If you stop all mongos instances, the applications will not be able to read from the database. If you stop all mongos instances, start a temporary mongos instance on that applications cannot access for the data migration procedure. 1. With the sharded cluster running, deploy a new replica set (page 603) in addition to your sharded cluster. The replica set must have sufficient capacity to hold all of the data files from all of the current shards combined. Do not configure the application to connect to the new replica set until the data transfer is complete. 2. Optionally remove the --shardsrv option, if your mongod started with this option. 1. Reconfigure the application to connect to the primary member of the replica set hosting the single shard that system will be the new replica set.