MongoDB Documentation, Release 3.0.4 sharding: clusterRole: shardsvr Or, if using the older configuration file format$^{50}$: shardsvr = true Finally, to establish the cluster, configure at least one mongos process with the following settings: Or, if using the older configuration file format$^{51}$: configdb = 10.8.0.12:27001 chunkSize = 64 Important: Always use 3 config servers in production environments. You can specify multiple configDB instances by specifying hostnames and ports in the form of a comma separated list. In general, avoid modifying the chunkSize from the default value of 64, 52 and ensure this setting is consistent among all mongos instances. The Sharding (page 661) section of the manual for more information on sharding and cluster configuration. In many cases running multiple instances of mongod on a single system is not recommended. On some types of deployments 53 and for testing purposes you may need to run more than one mongod on a single system. In these cases, use a base configuration (page 193) for each instance, but consider the following configuration values: Or, if using the older configuration file format$^{54}$: dbpath = /srv/mongodb/db0/ pidfilepath = /srv/mongodb/db0.pid The dbPath value controls the location of the mongod instance’s data directory. Ensure that each database has a distinct and well labeled data directory. The pidFilePath controls where mongod process places it’s process id Chapter 5. Administration 196 $^{50}$http://docs.mongodb.org/v2.4/reference/configuration-options $^{51}$http://docs.mongodb.org/v2.4/reference/configuration-options 52 Chunk size is 64 megabytes by default, which provides the ideal balance between the most even distribution of data, for which smaller chunk sizes are best, and minimizing chunk migration, for which larger chunk sizes are optimal. 53 Single-tenant systems with SSD or other high performance disks may provide acceptable performance levels for multiple mongod instances. Additionally, you may find that multiple databases with small working sets may function acceptably on a single system. $^{54}$http://docs.mongodb.org/v2.4/reference/configuration-options See also: Run Multiple Database Instances on the Same System In YAML format : In YAML format : storage: dbPath: /srv/mongodb/db0/ processManagement: pidFilePath: /srv/mongodb/db0.pid sharding: configDB: 10.8.0.12:27001 chunkSize: 64