mongos> db.runCommand({listshards:1})
{
"shards" : [
{
"_id" : "shard0001",
"host" : "ec2-aa-bb-cc-dd.compute-1.
},
{
"_id" : "shard0002",
"host" : "ec2-bb-cc-dd-ee.compute-1.
},
{
"_id" : "shard0003",
"host" : "xx.yy.zz.aa:27018"
(...)
How can I rename the shards, say, to shard0001.example.com,shard0002.example.com etc.?
Nobody knows? I'm running mongo 2.6.x if that helps.
It's this section of the docs:
http://docs.mongodb.org/
Cool, thanks.
For reference, for my 3-shard system, I've used something in the line of:
mongos> db.getSiblingDB("config").
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
mongos> db.getSiblingDB("config").
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
mongos> db.getSiblingDB("config").
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
mongos> db.runCommand({listshards:1})
{
"shards" : [
{
"_id" : "shard0001", "host" : "shard0001.example.com"
},
{
"_id" : "shard0002",
"host" : "shard0002.example.com"
},
{
"_id" : "shard0003",
"host" : "shard0003.example.com"
}
],
"ok" : 1
}
댓글 없음:
댓글 쓰기