Hi ,
I am working on chapter 3 and I have imported data in sharded cluster by connecting mongos.
i see it data is loaded and primary shard is “m103-repl-2”. but when i try to vailidate it is throwing error as below. Do i have to move primary shard to “m103-repl”
vagrant@m103:/shared/shard$ validate_lab_shard_collection
No documents found in m103.products - make sure you import the dataset into the
‘products’ collection in the ‘m103’ database.
vagrant@m103:/shared/shard$ validate_lab_shard_collection
Please find rs.status output.
=====================
MongoDB Enterprise mongos> sh.status()
— Sharding Status —
sharding version: {
“_id” : 1,
“minCompatibleVersion” : 5,
“currentVersion” : 6,
“clusterId” : ObjectId(“5c4922defe401b3b2410d221”)
}
shards:
{ “_id” : “m103-repl”, “host” : “m103-repl/192.168.103.100:27001,192.168.103.100:27002,192.168.103.100:27003”, “state” : 1 }
{ “_id” : “m103-repl-2”, “host” : “m103-repl-2/192.168.103.100:27004,192.168.103.100:27005,192.168.103.100:27006”, “state” : 1 }
active mongoses:
“3.6.9” : 2
autosplit:
Currently enabled: yes
balancer:
Currently enabled: yes
Currently running: no
Failed balancer rounds in last 5 attempts: 0
Migration Results for the last 24 hours:
1 : Success
databases:
{ “_id” : “config”, “primary” : “config”, “partitioned” : true }
config.system.sessions
shard key: { “_id” : 1 }
unique: false
balancing: true
chunks:
m103-repl 1
{ “_id” : { “$minKey” : 1 } } -->> { “_id” : { “$maxKey” : 1 } } on : m103-repl Timestamp(1, 0)
{ “_id” : “m103”, “primary” : “m103-repl-2”, “partitioned” : true }
m103.products
shard key: { “sku” : 1 }
unique: false
balancing: true
chunks:
m103-repl 1
m103-repl-2 2
{ “sku” : { “$minKey” : 1 } } -->> { “sku” : 23153496 } on : m103-repl Timestamp(2, 0)
{ “sku” : 23153496 } -->> { “sku” : 28928914 } on : m103-repl-2 Timestamp(2, 1)
{ “sku” : 28928914 } -->> { “sku” : { “$maxKey” : 1 } } on : m103-repl-2 Timestamp(1, 2)