[SERVER-8314]  Starting MongoDB using snapshot data on PIOPS volumes on Amazon EC2 environment Created: 24/Jan/13  Updated: 08/Mar/13  Resolved: 16/Feb/13

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.2.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Santosh Kumar L Assignee: Barrie Segal
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux


Operating System: ALL
Steps To Reproduce:

1.Setup a mongodb cluster on Amazon EC2 linux instances.
2. Once the cluster is up start the load on the db.
3. After the loading is completed stop all the mongo processes and take a snapshot of shard servers and config servers.
4. After snapshot is completed create new volumes and attach to the corresponding instances and start the cluster.

Participants:

 Description   

Hi,

We have a mongodb sharded cluster which was having a sharded database named "mydb" and loaded 333GB of data.
Once the total data is loaded, we have stopped all the mongod processes for shards, mongod processes for config servers and mongos process on all routers.
Then we have taken snapshots of all the volumes of the cluster. Then we have created volumes from the snapshots.
We have mounted volumes on the corresponding shards, config servers and started the processes.

Observations:

All the shards came up and the data is in tact. able to see the records present in the shards.
Then started config servers and routers. Router is able to add only shard1 and when tried to add other shards getting the following error message.

mongos> db.runCommand(

{ addshard : "shard2/10.10.10.10:27018" }

);
{
"ok" : 0,
"errmsg" : "can't add shard shard2/10.10.10.10:27018 because a local database 'mydb' exists in another shard1:shard1/10.10.10.1:27018,10.10.10.2:27018,10.10.10.3:27018"
}

Please let me know if we are missing anything here?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 24/Jan/13 ]

addShard is only for new empty shard.
If you are doing a restore like this, you need to either restore the config servers or edit them manually.
You probably want to recover the collections and then just change the shard mappings.

Generated at Thu Feb 08 03:17:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.