Tag Info

New answers tagged

1

Is this normal behavior during the transition where they have to take themselves offline? It is expected that your replica set instances will drop network connections when there is a change in primary. My only concern in this situation is what happens if VM1a goes down right after LocalMongo comes up? Wouldn't that mean that the only place where ...


1

New to MongoDB, but this is how I learned how to do the same thing following the MongoDB 202 class. There are other ways to balance traffic, such as moving, splitting and merging chunks. I haven't read anywhere that directly updating the tags collection in the config database was dirty or incorrect. The code below is untested, and you will have to replace ...


1

Your setup is plainly wrong. First, what sense does it make to have automatic failover when your storage system or the connection to it creates a single point of failure? And if you have a storage system which eliminates every single point of failure ( redundancy in power, network interfaces plus network infrastructure, RAID controllers, main boards and ...


0

I can just give you rules of thumb, of course. But it may help you. Disk space and setup In order to be able to create backups in a proper way, you should have at least have a RAID10 (the suggested RAID level for MongoDB) with a payload of around 2.5TB. Let me explain why: You don't want to have 100% utilization of your disk space, so we add a reasonable ...


1

The upgrade lock record is not removed post upgrade. A "state" of 0 means the lock is not being held. You can ignore or remove manually. The lock definitions for MongoDB 2.6 are available here and are: 0: Unlocked | 1: Locks in contention | 2: Lock held


0

Check this guide: http://docs.mongodb.org/manual/tutorial/backup-with-mongodump/ Create Backups Without a Running mongod Instance If your MongoDB instance is not running, you can use the --dbpath option to specify the location to your MongoDB instance’s database files. mongodump reads from the data files directly with this operation. This locks the data ...


1

Please read the replication documentation before you go into production. Make sure you have understood them. As per your questions: You don't need config servers, as they are only needed for sharded environments You don't need mongos instances, as they are only needed for accessing shards. You only need an arbiter if you have an even number of data ...


0

Mongos and Config servers are part of sharded environments so the answer is NO. It is recommended on a replica set to have odd numbers of nodes. In case you have even number of nodes and no further capacity for data node then you may use an arbiter, but it is not mandatory if data nodes is odd number.


1

With the need of 10TB to be backed up this gets a bit complicated. Replicas are no replacement for proper backups While delayed replica set members can provide an relatively easy way to help you with accidental operations, there are no replacement for proper backups, very much like RAID isn't a replacement for file system based backups. Recommendations ...


1

I suspect you had MongoDB 2.4 installed previously. In MongoDB 2.4 the service was called mongodb and used /etc/mongodb.conf (ref: Install MongoDB 2.4 on Ubuntu). With MongoDB 2.6 there was an attempt to have more standard package names across Linux distributions, so the service was renamed to mongod (to reflect the actual daemon being started) and the ...


0

As the desc field suggests, that operation is a replication operation, and is expected when you are running replica sets - there may be several in fact since MongoDB uses multi-threaded replication. You should not kill those operations as that can cause replication to fail.


0

For the port you need to start mongod with parameter --port 57777 . Alternative place it on the configuration file under net: port: 57777 For the username and password part you need to enable security by start mongod with parameter--auth . Alternative place it on the configuration file under security.authorization = enable Then you can create the ...


2

There are two options PHYSICAL BACKUP If you don't mind downtime, simplest thing to do is service mongod stop Do an LVM snapshot or a brute force cp of the Mongo data folder to another disk service mongod start Of course, you don't want downtime if the 10TB of data is on a standalone machine. DELAYED REPLICA SET If you have a replica set with three ...


2

Yes, you can do this, and in fact with just 2 data centers you really have no other choice. Essentially, whenever you do not have a primary you can still do a reconfig but you must pass in {force:true} to make it happen on a non-primary node. This is listed in the docs for the rs.reconfig() command and in detail (with examples) as part of a tutorial which ...


3

Remove the space between the comma and the second IP. It does not look like mongod is handling gracefully.


1

Just execute on shell "use dbname" When you insert the first document on any collection you will see the db with "show dbs"


2

Your query is using the index to fetch the results but needs to sort them afterwards which is an expensive operation. "scanAndOrder" : true, scanAndOrder is a boolean that is true when the query cannot use the order of documents in the index for returning sorted results: MongoDB must sort the documents after it receives the documents from a cursor. The ...


0

If all the other components are upgraded, then there will be no impact to the sharded database caused by upgrading the remaining primary. The important pieces for the sharded database/collection are mongos and the config servers rather than the individual members in this case, and you have already done that piece. If you want to be particularly careful, ...


0

In order to deploy a shard key in your case (name,age) you need to pre-create an index on (name,age). Shard key can be unique, but I don't see how a unique constraint fits here, for example isn't likely to have two same records? (name:Mary age:26?).


0

MMS charts have multiple quantities you can add to determine the number of reads and the number of writes - at a glance they are: Reads: queries getmores Writes: inserts updates deletes/removes As a general ballpark value, the ratio of these is fine. It's not quite this simple though because there are other read and write "loads" on the system: ...


1

There are two way. opcounters Build as sum of the opcounters which are write operations, build a sum of the opcounters which are read operations set them into relation. To do this reliably for a sharded cluster, you have to create a dashboard which groups the opcounters for the shards. network in/out ratio This is self explanatory. But please keep in ...


2

For data migration (or backup) between MongoDB servers, you should be using mongodump and mongorestore (binary backups) rather than mongoimport/mongoexport (text backups). Backups (and restores) of sharded collections need to be done through a mongos. There are several reasons to use mongodump/mongorestore: binary backups preserve type fidelity in your ...


1

You can run a --repairDatabase for that node: mongod --repair --repairpath <repair_path> Keep in mind that the repair path should have at least as your data size free disk space. (if you have 100GB, the repair path should have at least 100GB free also. That should take care of problems of that sort. Also, in the future if anything of some sort ...


2

The way I understand it, the hidden secondary will always be behind by the number of seconds defined by slaveDelay. In your case, at any moment in the day, the hidden secondary will always be behind by three hours from the last write to the oplog. If there is no more write activity, then the hidden secondary will be completely caught up in three hours. You ...



Top 50 recent answers are included