Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set proper mongo data directory #43

Merged
merged 5 commits into from
Nov 9, 2018

Conversation

malaskowski
Copy link
Contributor

Fixes #42
By mistake, AET MongoDB data folder was set to the default value for the sc-mongodb cookbook which is /var/lib/mongo/ directory.
After this fix, MongoDB will be configured to store its data under /opt/aet/mongodb/db.

This is critical bugfix for the instances with separate disk/lvm configured for MognoDB.

Important!
If your instance is provisioned with aet-cookbook versions v5.0.0 or v5.1.0 you need to manually move your MongoDB data. Please follow steps below after upgrading your instance with version of cookbook that contains this fix:

  1. Stop Karaf instance with sudo service karaf stop
  2. Stop MongoDB instance with sudo service mongod stop
  3. Clear /opt/aet/mongodb/db with sudo rm -rf /opt/aet/mongodb/db/*
  4. Move all the data from the old director to the new with: sudo mv -f /var/lib/mongo/* /opt/aet/mongodb/db (depending of the size of your database it may tak a while, if you wish you may use rsync instead of mv).
  5. Start MongoDB instance with sudo service mongod start. Check if all the databases are visible after data migration.
  6. Start Karaf instance with sudo service karaf start

@wiiitek wiiitek merged commit ccc6e7a into master Nov 9, 2018
@wiiitek wiiitek deleted the bugfix/set-proper-mongo-data-location branch November 9, 2018 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MognoDB stores data under wrong directory
4 participants