-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
*Location*: http://docs.mongodb.org/manual/reference/command/repairDatabase/
*User-Agent*: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 IKDhPmJcdw
*Referrer*: http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDMQFjAA&url=http%3A%2F%2Fdocs.mongodb.org%2Fmanual%2Freference%2Fcommand%2FrepairDatabase&ei=eyT_U-yEE4SrOrSggfgG&usg=AFQjCNH9E9UapfuLSjysUJiivqNCPg5T2g&bvm=bv.74035653,d.ZWU&cad=rja
*Screen Resolution*: 1680 x 1050
*repo*: docs
*source*: reference/command/repairDatabase
*Location*: http://docs.mongodb.org/manual/reference/command/repairDatabase/ *User-Agent*: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 IKDhPmJcdw *Referrer*: http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDMQFjAA&url=http%3A%2F%2Fdocs.mongodb.org%2Fmanual%2Freference%2Fcommand%2FrepairDatabase&ei=eyT_U-yEE4SrOrSggfgG&usg=AFQjCNH9E9UapfuLSjysUJiivqNCPg5T2g&bvm=bv.74035653,d.ZWU&cad=rja *Screen Resolution*: 1680 x 1050 *repo*: docs *source*: reference/command/repairDatabase
What about sharding? Can db.repairDatabase() be run against a router (mongos)? Will mongos run the command for a sharded database on all shards and on all replicaSet members simultaneously? What happens if only one replicaSet member doesn't have enough free disk space? Will it cancel the command on all the other mongod instances as well? How is it possible to pass the repairpath parameter if running the command against mongos? If it's not possible, do we need to run the command against every mongod instance of the sharded system or "only" against the primary of every replicaSet/shard?