|
| 1 | +title: "Disable the balancer." |
| 2 | +ref: change-wt-config-svr-disable-balancer |
| 3 | +content: | |
| 4 | + Turn off the :ref:`balancer <sharding-balancing-internals>` in the |
| 5 | + sharded cluster, as described in |
| 6 | + :ref:`sharding-balancing-disable-temporarily`. |
| 7 | +action: |
| 8 | + language: sh |
| 9 | + code: | |
| 10 | + sh.disableBalancer() |
| 11 | +--- |
| 12 | +title: "Shut down the **third** config server." |
| 13 | +ref: change-wt-config-svr-shutdown-3 |
| 14 | +content: | |
| 15 | + Use the :program:`mongo` shell to shut down the third config server. |
| 16 | +
|
| 17 | + The third config server is the last one listed in the |
| 18 | + :program:`mongos` :setting:`~sharding.configDB` setting. |
| 19 | +action: | |
| 20 | + language: sh |
| 21 | + code: | |
| 22 | + db.shutdownServer() |
| 23 | +--- |
| 24 | +title: "Export the data of the **second** config server with ``mongodump``." |
| 25 | +ref: change-wt-config-svr-export-2 |
| 26 | +pre: | |
| 27 | + The second config server is the second server listed in the |
| 28 | + :program:`mongos` setting :setting:`~sharding.configDB`. |
| 29 | +action: |
| 30 | + language: sh |
| 31 | + code: | |
| 32 | + mongodump --out <exportDataDestination> |
| 33 | +post: | |
| 34 | + Specify additional options as appropriate, such as username and |
| 35 | + password if running with authorization enabled. See |
| 36 | + :program:`mongodump` for available options. |
| 37 | +--- |
| 38 | +title: "For the **second** config server, create a data directory for the new ``mongod`` running with WiredTiger." |
| 39 | +ref: change-wt-config-svr-create-dir-2 |
| 40 | +content: | |
| 41 | + Create a data directory for the new :program:`mongod` instance that |
| 42 | + will run with the WiredTiger storage engine. ``mongod`` must have read |
| 43 | + and write permissions for this directory. |
| 44 | +
|
| 45 | + ``mongod`` with WiredTiger will not start with data files created with |
| 46 | + a different storage engine. |
| 47 | +--- |
| 48 | +title: "Start the **second** config server ``mongod`` with WiredTiger." |
| 49 | +ref: change-wt-config-svr-restart-w-wiredtiger-2 |
| 50 | +pre: | |
| 51 | + Start :program:`mongod` as a config server, specifying ``wiredTiger`` |
| 52 | + as the :option:`--storageEngine` and the newly created data directory |
| 53 | + for WiredTiger as the :option:`--dbpath`. Specify additional options |
| 54 | + as appropriate. |
| 55 | +action: |
| 56 | + language: sh |
| 57 | + code: | |
| 58 | + mongod --storageEngine wiredTiger --dbpath <newWiredTigerDBPath> --configsvr |
| 59 | +post: | |
| 60 | +
|
| 61 | + .. include:: /includes/fact-storage-engine-configuration-file-setting.rst |
| 62 | +--- |
| 63 | +title: "Upload the exported data using ``mongorestore`` to the **second** config server." |
| 64 | +ref: change-wt-config-svr-upload-data-2 |
| 65 | +action: |
| 66 | + language: sh |
| 67 | + code: | |
| 68 | + mongorestore <exportDataDestination> |
| 69 | +post: | |
| 70 | + Specify additional options as appropriate. See |
| 71 | + :program:`mongorestore` for available options. |
| 72 | +--- |
| 73 | +title: "Shut down the **second** config server." |
| 74 | +ref: change-wt-config-svr-shutdown-2 |
| 75 | +pre: | |
| 76 | + When the :program:`mongorestore` procedure of the previous step is |
| 77 | + complete, use the :program:`mongo` shell to shut down the second |
| 78 | + config server. This is necessary to maintain only two active config |
| 79 | + servers at once and keep the sharded cluster's metadata read-only. |
| 80 | +action: |
| 81 | + language: sh |
| 82 | + code: | |
| 83 | + db.shutdownServer() |
| 84 | +--- |
| 85 | +title: "Restart the **third** config server." |
| 86 | +ref: change-wt-config-svr-restart-3 |
| 87 | +pre: | |
| 88 | + Simply restart the third config server with its original startup |
| 89 | + options. **Do not** change it to use the WiredTiger storage engine |
| 90 | + yet, as that will be done in a later step. |
| 91 | +action: |
| 92 | + language: sh |
| 93 | + code: | |
| 94 | + mongod --configsvr |
| 95 | +--- |
| 96 | +title: "Export the data of the **third** config server with ``mongodump``." |
| 97 | +ref: change-wt-config-svr-export-3 |
| 98 | +action: |
| 99 | + language: sh |
| 100 | + code: | |
| 101 | + mongodump --out <exportDataDestination> |
| 102 | +post: | |
| 103 | + Specify additional options as appropriate, such as username and |
| 104 | + password if running with authorization enabled. See |
| 105 | + :program:`mongodump` for available options. |
| 106 | +--- |
| 107 | +title: "For the **third** config server, create a data directory for the new ``mongod`` running with WiredTiger." |
| 108 | +ref: change-wt-config-svr-create-dir-3 |
| 109 | +content: | |
| 110 | + Create a data directory for the new :program:`mongod` instance that |
| 111 | + will run with the WiredTiger storage engine. ``mongod`` must have read |
| 112 | + and write permissions for this directory. |
| 113 | +
|
| 114 | + ``mongod`` with WiredTiger will not start with data files created with |
| 115 | + a different storage engine. |
| 116 | +--- |
| 117 | +title: "Start the **third** config server with WiredTiger." |
| 118 | +ref: change-wt-config-svr-restart-w-wiredtiger-3 |
| 119 | +pre: | |
| 120 | + Start :program:`mongod` as a config server, specifying ``wiredTiger`` |
| 121 | + as the :option:`--storageEngine` and the newly created data directory |
| 122 | + for WiredTiger as the :option:`--dbpath`. Specify additional options |
| 123 | + as appropriate. |
| 124 | +action: |
| 125 | + language: sh |
| 126 | + code: | |
| 127 | + mongod --storageEngine wiredTiger --dbpath <newWiredTigerDBPath> --configsvr |
| 128 | +post: | |
| 129 | + .. include:: /includes/fact-storage-engine-configuration-file-setting.rst |
| 130 | +--- |
| 131 | +title: "Upload the exported data using ``mongorestore`` to the **third** config server." |
| 132 | +ref: change-wt-config-svr-upload-data-3 |
| 133 | +action: |
| 134 | + language: sh |
| 135 | + code: | |
| 136 | + mongorestore <exportDataDestination> |
| 137 | +post: | |
| 138 | + Specify additional options as appropriate. See |
| 139 | + :program:`mongorestore` for available options |
| 140 | +--- |
| 141 | +title: "Export data of the **first** config server with ``mongodump``." |
| 142 | +ref: change-wt-config-svr-export-1 |
| 143 | +action: |
| 144 | + language: sh |
| 145 | + code: | |
| 146 | + mongodump --out <exportDataDestination> |
| 147 | +post: | |
| 148 | + Specify additional options as appropriate, such as username and |
| 149 | + password if running with authorization enabled. See |
| 150 | + :program:`mongodump` for available options. |
| 151 | +--- |
| 152 | +title: "For the **first** config server, create a data directory for the new ``mongod`` running with WiredTiger." |
| 153 | +ref: change-wt-config-svr-create-dir-1 |
| 154 | +content: | |
| 155 | + Create a data directory for the new :program:`mongod` instance that |
| 156 | + will run with the WiredTiger storage engine. ``mongod`` must have read |
| 157 | + and write permissions for this directory. |
| 158 | +
|
| 159 | + ``mongod`` with WiredTiger will not start with data files created with |
| 160 | + a different storage engine. |
| 161 | +--- |
| 162 | +title: "Start the **first** config server with WiredTiger." |
| 163 | +ref: change-wt-config-svr-restart-w-wiredtiger-1 |
| 164 | +pre: | |
| 165 | + Start :program:`mongod` as a config server, specifying ``wiredTiger`` |
| 166 | + as the :option:`--storageEngine` and the newly created data directory |
| 167 | + for WiredTiger as the :option:`--dbpath`. Specify additional options |
| 168 | + as appropriate. |
| 169 | +action: |
| 170 | + language: sh |
| 171 | + code: | |
| 172 | + mongod --storageEngine wiredTiger --dbpath <newWiredTigerDBPath> --configsvr |
| 173 | +post: | |
| 174 | + .. include:: /includes/fact-storage-engine-configuration-file-setting.rst |
| 175 | +--- |
| 176 | +title: "Upload the exported data using ``mongorestore`` to the **first** config server." |
| 177 | +ref: change-wt-config-svr-upload-data-1 |
| 178 | +action: |
| 179 | + language: sh |
| 180 | + code: | |
| 181 | + mongorestore <exportDataDestination> |
| 182 | +post: | |
| 183 | + Specify additional options as appropriate. See |
| 184 | + :program:`mongorestore` for available options |
| 185 | +--- |
| 186 | +title: "Enable writes to the sharded cluster's metadata." |
| 187 | +ref: change-wt-config-svr-start-2 |
| 188 | +pre: | |
| 189 | + Restart the **second** config server with the same options as in step |
| 190 | + 5. Remember to specify WiredTiger as the :option:`--storageEngine` and |
| 191 | + the newly created WiredTiger data directory as the :option:`--dbpath`. |
| 192 | +action: |
| 193 | + language: sh |
| 194 | + code: | |
| 195 | + mongod --storageEngine wiredTiger --dbpath <newWiredTigerDBPath> --configsvr |
| 196 | +post: | |
| 197 | + .. include:: /includes/fact-storage-engine-configuration-file-setting.rst |
| 198 | +
|
| 199 | + Once all three config servers are up, the sharded cluster's metadata |
| 200 | + is available for writes. |
| 201 | +--- |
| 202 | +title: "Re-enable the balancer." |
| 203 | +ref: change-wt-config-svr-reenable-balancer |
| 204 | +pre: | |
| 205 | + Once all three config servers are up and running with WiredTiger, |
| 206 | + :ref:`re-enable the balancer <sharding-balancing-enable>`. |
| 207 | +action: |
| 208 | + language: sh |
| 209 | + code: | |
| 210 | + sh.startBalancer() |
| 211 | +... |
0 commit comments