-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
change-replica-set-wiredtiger.txt
70 lines (46 loc) · 1.89 KB
/
change-replica-set-wiredtiger.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
================================
Change Replica Set to WiredTiger
================================
.. default-domain:: mongodb
Starting in version 3.2, WiredTiger is the default storage engine
for MongoDB.
This tutorial gives an overview of changing the storage engine of a
:term:`replica set` member to :ref:`WiredTiger
<storage-wiredtiger>`.
Considerations
--------------
Replica sets can have members with different storage engines. As such,
you can update members to use the WiredTiger storage engine in a rolling
fashion.
.. include:: /includes/fact-wiredtiger-minimum-version.rst
Procedure
---------
To update a member to WiredTiger, the procedure removes a member's
data, starts :binary:`~bin.mongod` with WiredTiger, and performs an
:doc:`initial sync </tutorial/resync-replica-set-member>`.
.. tip::
To update all members of the replica set to use WiredTiger, update
the members in a rolling manner. That is, update, one by one, all
:term:`secondary` members first. Then, once all the secondary
members have been updated, :method:`step down <rs.stepDown()>` the
:term:`primary`, and update that stepped-down member.
Update a secondary member.
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. container:: admonition
.. include:: /includes/steps/change-replica-set-wiredtiger.rst
To update another secondary, repeat the previous steps.
Update the primary.
~~~~~~~~~~~~~~~~~~~
.. important::
If updating all members of the replica set to use WiredTiger, ensure
that all secondary members have been updated first before updating
the primary.
To update the primary, :method:`step down <rs.stepDown()>` the
:term:`primary`.
.. container:: admonition
.. code-block:: javascript
rs.stepDown()
When the primary has stepped down and become a secondary, update the
secondary to use WiredTiger as before:
.. container:: admonition
.. include:: /includes/steps/change-replica-set-wiredtiger.rst