tmountain
unread,Nov 14, 2011, 2:20:27 PM11/14/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
We're trying to finish draining a shard, and we can't complete the
process because a database with an invalid name is primary to the
shard we're trying to remove. I'm not certain how the database got
created, but it was likely a typo when setting up sharding.
> db.printShardingStatus()
... abbreviated output ...
{ "_id" : "notifications", "partitioned" : true, "primary" :
"feeds_fio_1" }
notifications.userNotifications chunks:
feeds_fio_1 1
{ "sk" : { $minKey : 1 } } -->> { "sk" : { $maxKey : 1 } } on :
feeds_fio_1 { "t" : 2000, "i" : 0 }
{ "_id" : "notifications ", "partitioned" : false, "primary" :
"feeds_fio_3" }
The first "notifications" db is the db that's actually in production.
The second db has a space at the end (i.e., "notifications "). It
seems that neither the PHP, Python, or Ruby driver can deal with this
DB correctly, and trying to manipulate it from the mongo shell fails
as well.
I'm tempted to just try doing this: db.databases.remove({'_id':
'notifications '}); but I'm afraid it might have some unwanted side-
effect like removing the notifications db that's in production
(developer paranoia here).
We've tried moving it to another primary, but again this fails (due to
the space in the name).
> db.runCommand({moveprimary:"notifications ", to:"feeds_fio_1"});
{ "ok" : 0, "errmsg" : "clone failed" }
Please advise how to proceed here.