Mongodb Sharding Commands

sh.addShard('replicateSet1/host:port');
sh.enableSharding('database');

//Shard key should be index of the collection
sh.shardCollection('db.collection', 'shard key');

sh.status();

猜你喜欢

转载自flynndang.iteye.com/blog/1788692