3 Rollback to Revision 1
source | link

mongo Mongo repairDatabase procedure

I need to run a repairDatabaserepairDatabase in mongomongo in order to reclaim some OSos disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. mongoMongo is currently running via sudosudo service MongoDBmongodb start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if mongoMongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart mongoMongo using sudosudo service MongoDBmongodb start
  • I then wait for the oplogsoplogs to catch up and for the mongosmongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown()rs.stepDown() so that mongodb-perf-01mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.

mongo repairDatabase procedure

I need to run a repairDatabase in mongo in order to reclaim some OS disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. mongo is currently running via sudo service MongoDB start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if mongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart mongo using sudo service MongoDB start
  • I then wait for the oplogs to catch up and for the mongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown() so that mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.

Mongo repairDatabase procedure

I need to run a repairDatabase in mongo in order to reclaim some os disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. Mongo is currently running via sudo service mongodb start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if Mongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart Mongo using sudo service mongodb start
  • I then wait for the oplogs to catch up and for the mongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown() so that mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.
2 correction of spelling of MongoDB and mongo and also formatting of the text
source | link

Mongo mongo repairDatabase procedure

I need to run a repairDatabaserepairDatabase in mongomongo in order to reclaim some osOS disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. Mongomongo is currently running via sudosudo service mongodbMongoDB start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if Mongomongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart Mongomongo using sudosudo service mongodbMongoDB start
  • I then wait for the oplogsoplogs to catch up and for the mongosmongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown()rs.stepDown() so that mongodb-perf-01mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.

Mongo repairDatabase procedure

I need to run a repairDatabase in mongo in order to reclaim some os disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. Mongo is currently running via sudo service mongodb start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if Mongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart Mongo using sudo service mongodb start
  • I then wait for the oplogs to catch up and for the mongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown() so that mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.

mongo repairDatabase procedure

I need to run a repairDatabase in mongo in order to reclaim some OS disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. mongo is currently running via sudo service MongoDB start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if mongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart mongo using sudo service MongoDB start
  • I then wait for the oplogs to catch up and for the mongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown() so that mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.
1
source | link

Mongo repairDatabase procedure

I need to run a repairDatabase in mongo in order to reclaim some os disk space. Can anyone provide feedback on the following procedure: let me know if its correct, if I'm missing anything, if the steps are in order, etc.

The setup is a primary/secondary on separate servers. They are both about out of disk space. My plan is to repair the database on each one separately after the other completes. As I am out of disk space, I will be using an external block storage from my cloud provider to use as a repair path. Mongo is currently running via sudo service mongodb start. To complete this it seems that I'll run the following:

  • On the primary I step down using rs.stepDown()
  • I shutdown mongo using rs.shutdownServer() - Is this correct? For the next step it seems that I shouldn't run it if Mongo already has another instance running.
  • On the primary I run mongod --config /etc/mongodb.conf --repair --repairpath PATH_TO_BLOCK_STORAGE
  • When complete, do I need to copy the data in the repair path over to the original (/var/lib/mongodb)?
  • Once back up, I restart Mongo using sudo service mongodb start
  • I then wait for the oplogs to catch up and for the mongos to be in sync.
  • Once they primary and secondary are in sync I then go onto mongodb-perf-02 and run rs.stepDown() so that mongodb-perf-01 is the primary again.
  • Once complete I then repeat this on the secondary.