Project

Profile

Help

Task #3112

closed

Write a blog post with a recipe on how to reclaim a disk space used by MongoDB

Added by ttereshc over 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 34
Quarter:

Description

A common problem, especially in heavily loaded cases, is that MongoDB can use much more disk space than it needs after some time. And users are willing to reclaim disk space when it happens.

MongoDB docs: https://docs.mongodb.com/manual/reference/command/repairDatabase/#repairdatabase-wrappers

The suggestion is to write a blog post showing a recipe in the format of shell script which will:
- remind/suggest to make a backup
- perform checks
-- pulp services are stopped
-- mongod is not running
-- there is enough disk space (according to docs, twice of the used space + 2GB) to perform mongod --repair
- as a mongodb user, run mongod --repair (with additional parameters if needed)
- print to the stdout how much space was used before and after a repair.

Make sure, script works for MongoDB 2.6 (it's a default version for RHEL7).

Actions #3

Updated by mhrivnak over 6 years ago

  • Groomed changed from No to Yes

Looks good to me. This is a very common concern among users, so it is valuable for us to make this known as a way to reclaim space.

Actions #4

Updated by mhrivnak over 6 years ago

  • Sprint Candidate changed from No to Yes
Actions #5

Updated by mhrivnak over 6 years ago

  • Sprint/Milestone set to 47
Actions #6

Updated by ttereshc over 6 years ago

Alternative suggestion which came up during sprint planning and discussed later with bmbouter:
- add to the Pulp docs a general idea how to reclaim disk space and a link to MongoDB docs
- create a full recipe/script for MongoDB 2.4 and post it in Pulp blog

It gives users a script to work with and they can adapt it to their MongoDB version if needed.
At the same time there is no need to maintain and keep up to date the script in Pulp docs which can be an issue.

Any thoughts or objections?
If not, I'll update the description.

Actions #7

Updated by rchan over 6 years ago

  • Sprint/Milestone changed from 47 to 48
Actions #8

Updated by ttereshc over 6 years ago

  • Subject changed from Add a recipe to the docs to reclaim a disk space used by MongoDB to Write a blog post with a recipe on how to reclaim a disk space used by MongoDB
  • Description updated (diff)

I've updated description according to comment#6

Actions #10

Updated by rchan over 6 years ago

  • Sprint/Milestone changed from 48 to 52
Actions #11

Updated by rchan about 6 years ago

  • Sprint/Milestone changed from 52 to 53
Actions #12

Updated by jortel@redhat.com about 6 years ago

  • Sprint/Milestone changed from 53 to 54
Actions #13

Updated by rchan about 6 years ago

  • Sprint/Milestone changed from 54 to 56
Actions #14

Updated by daviddavis about 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #15

Updated by daviddavis about 6 years ago

  • Status changed from ASSIGNED to POST
Actions #16

Updated by daviddavis about 6 years ago

I'm a bit hesitant to write a script that users can run to reclaim space since there are things users need to be aware of before they run repair. I worry that they'll be tempted to just run the script without noticing that it'll take a long time or that they need to backup first. Also, it's really just a single command they need to run to reclaim space. So I wrote the blog post as a guide to reclaiming space. Feel free to let me know if you disagree though.

Actions #18

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 33
Actions #19

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (56)
Actions #20

Updated by jortel@redhat.com about 6 years ago

  • Sprint changed from Sprint 33 to Sprint 34
Actions #21

Updated by daviddavis about 6 years ago

  • Status changed from POST to CLOSED - COMPLETE
Actions #22

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF