Skip to content

DOCS-9267 WT space requirements for repairDatabase #3147

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

Merged
merged 1 commit into from
Dec 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions source/reference/command/repairDatabase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,31 @@ Behavior

.. include:: /includes/warning-blocking-global.rst

.. note:: :dbcommand:`repairDatabase` requires free disk space equal to the size
of your current data set plus 2 gigabytes. If the volume that holds dbpath
lacks sufficient space, you can mount a separate volume
and use that for the repair. When mounting a separate volume for
:dbcommand:`repairDatabase` you must run :dbcommand:`repairDatabase`
from the command line and use the
:option:`--repairpath <mongod --repairpath>`
switch to specify the folder in which to store
temporary repair files.


The time requirement for :dbcommand:`repairDatabase` depends on the
size of the data set.

:dbcommand:`repairDatabase` recreates all indexes in the database.

MMAPv1
~~~~~~

:dbcommand:`repairDatabase` requires free disk space equal to the size of your
current data set plus 2 gigabytes.
If the volume that holds dbpath lacks sufficient space, you can mount a separate volume
and use that for the repair. When mounting a separate volume for
:dbcommand:`repairDatabase` you must run :dbcommand:`repairDatabase`
from the command line and use the
:option:`--repairpath <mongod --repairpath>`
switch to specify the folder in which to store
temporary repair files.

WiredTiger
~~~~~~~~~~

:dbcommand:`repairDatabase` performs the operation in-place and does not require
additional disk space.


``repairDatabase`` and ``compact``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down