Project

Profile

Help

Task #3112

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

Added by ttereshc about 4 years ago. Updated over 2 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).

History

#3 Updated by mhrivnak about 4 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.

#4 Updated by mhrivnak about 4 years ago

  • Sprint Candidate changed from No to Yes

#5 Updated by mhrivnak about 4 years ago

  • Sprint/Milestone set to 47

#6 Updated by ttereshc about 4 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.

#7 Updated by rchan about 4 years ago

  • Sprint/Milestone changed from 47 to 48

#8 Updated by ttereshc about 4 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

#10 Updated by rchan almost 4 years ago

  • Sprint/Milestone changed from 48 to 52

#11 Updated by rchan almost 4 years ago

  • Sprint/Milestone changed from 52 to 53

#12 Updated by jortel@redhat.com almost 4 years ago

  • Sprint/Milestone changed from 53 to 54

#13 Updated by rchan almost 4 years ago

  • Sprint/Milestone changed from 54 to 56

#14 Updated by daviddavis almost 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#15 Updated by daviddavis almost 4 years ago

  • Status changed from ASSIGNED to POST

#16 Updated by daviddavis almost 4 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.

#18 Updated by bmbouter over 3 years ago

  • Sprint set to Sprint 33

#19 Updated by bmbouter over 3 years ago

  • Sprint/Milestone deleted (56)

#20 Updated by jortel@redhat.com over 3 years ago

  • Sprint changed from Sprint 33 to Sprint 34

#21 Updated by daviddavis over 3 years ago

  • Status changed from POST to CLOSED - COMPLETE

#22 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF