~]$ ./repro.sh Creating "foo" and sharding by "geo" (mongos = mongos_svr_A:27017) { "_id" : "reshard_test_db.foo", "lastmodEpoch" : ObjectId("5bf3bd2e932b8fad2c4cf328"), "lastmod" : ISODate("1970-02-19T17:02:47.296Z"), "dropped" : false, "key" : { "geo" : 1 }, "unique" : false, "uuid" : UUID("c4e4f1ac-76cb-4c79-b816-91b4ee6b11ac") } Running dataSize (mongos = mongos_svr_B:27017) { "dataSize" : "reshard_test_db.foo", "keyPattern" : { "geo" : 1 }, "min" : { "geo" : 100 }, "max" : { "geo" : 200 } } { "size" : 3500, "numObjects" : 100, "millis" : 0, "ok" : 1, "$clusterTime" : {...}, "operationTime" : Timestamp(1542700334, 418) } Dropping "foo", recreating and re-sharding by "_id" { "_id" : "reshard_test_db.foo", "lastmodEpoch" : ObjectId("000000000000000000000000"), "lastmod" : ISODate("2018-11-20T07:52:14.806Z"), "dropped" : true } Running dataSize (mongos = mongos_svr_B:27017) { "dataSize" : "reshard_test_db.foo", "keyPattern" : { "_id" : 1 }, "min" : { "_id" : 100 }, "max" : { "_id" : 200 } } { "ok" : 0, "errmsg" : "keyPattern must equal shard key", "code" : 13408, "codeName" : "Location13408", "$clusterTime" : {...}, "operationTime" : Timestamp(1542700336, 52) } Executing an insert() on foo. (mongos = mongos_svr_B:27017) WriteResult({ "nInserted" : 1 }) Running dataSize again (mongos = mongos_svr_B:27017) { "dataSize" : "reshard_test_db.foo", "keyPattern" : { "_id" : 1 }, "min" : { "_id" : 100 }, "max" : { "_id" : 200 } } { "estimate" : false, "size" : 1800, "numObjects" : 100, "millis" : 0, "ok" : 1, "$clusterTime" : {...}, "operationTime" : Timestamp(1542700336, 54) }