From aa89da5aa6205363b82daf062d8e5298e5f511d6 Mon Sep 17 00:00:00 2001 From: Andrew Aldridge Date: Thu, 6 Aug 2015 18:14:03 -0400 Subject: [PATCH] s/control script/init script/ --- source/administration/configuration.txt | 17 ++++++++--------- .../list-mongodb-enterprise-packages.rst | 14 +++++++------- source/includes/list-mongodb-org-packages.rst | 14 +++++++------- .../steps-deploy-replica-set-with-auth.yaml | 4 ++-- source/includes/steps-deploy-replica-set.yaml | 16 ++++++++-------- source/reference/configuration-options.txt | 4 ++-- source/reference/glossary.txt | 4 ++-- source/tutorial/expand-replica-set.txt | 6 +++--- .../install-mongodb-enterprise-on-red-hat.txt | 2 +- source/tutorial/install-mongodb-on-amazon.txt | 2 +- source/tutorial/install-mongodb-on-debian.txt | 2 +- source/tutorial/install-mongodb-on-red-hat.txt | 2 +- source/tutorial/install-mongodb-on-suse.txt | 2 +- source/tutorial/install-mongodb-on-ubuntu.txt | 2 +- source/tutorial/manage-mongodb-processes.txt | 2 +- ...ure-replica-set-with-unavailable-members.txt | 4 ++-- ...cover-data-following-unexpected-shutdown.txt | 16 +++++++++------- 17 files changed, 57 insertions(+), 56 deletions(-) diff --git a/source/administration/configuration.txt b/source/administration/configuration.txt index 33b2e35816c..662d6b37c3f 100644 --- a/source/administration/configuration.txt +++ b/source/administration/configuration.txt @@ -15,13 +15,12 @@ best-practice configurations for common use cases. While both interfaces provide access to the same collection of options and settings, this document primarily uses the configuration file -interface. If you run MongoDB using a control script or installed from -a package for your operating system, you likely already have a +interface. If you run MongoDB using a :term:`init script` or if you installed +from a package for your operating system, you likely already have a configuration file located at ``/etc/mongod.conf``. Confirm this by checking the contents of the ``/etc/init.d/mongod`` or -``/etc/rc.d/mongod`` script to ensure that the :term:`control scripts -` start the :program:`mongod` with the appropriate -configuration file (see below.) +``/etc/rc.d/mongod`` script to ensure that the init scripts start the +:program:`mongod` with the appropriate configuration file. To start a MongoDB instance using this configuration file, issue a command in the following form: @@ -233,7 +232,7 @@ instances that connect to the set. The keyfile must be less than one kilobyte in size and may only contain characters in the base64 set and the file must not have group or "world" permissions on UNIX systems. -.. seealso:: +.. seealso:: The :ref:`Replica Set Security ` section for information on configuring authentication with replica sets. @@ -320,7 +319,7 @@ Or, if using the :v2.4:`older configuration file format .. important:: Always use 3 config servers in production environments. You can specify multiple :setting:`~sharding.configDB` instances by specifying -hostnames and ports in the form of a comma separated list. +hostnames and ports in the form of a comma separated list. In general, avoid modifying the :setting:`~sharding.chunkSize` from the default value of 64, @@ -371,8 +370,8 @@ places it's :term:`process id ` file. As this tracks the specific :program:`mongod` file, it is crucial that file be unique and well labeled to make it easy to start and stop these processes. -Create additional :term:`control scripts ` and/or -adjust your existing MongoDB configuration and control script as +Create additional :term:`init scripts ` and/or +adjust your existing MongoDB configuration and init script as needed to control these processes. .. [#multimongod] Single-tenant systems with :term:`SSD` or other high diff --git a/source/includes/list-mongodb-enterprise-packages.rst b/source/includes/list-mongodb-enterprise-packages.rst index f5c31ba7510..e0ba7a3efd0 100644 --- a/source/includes/list-mongodb-enterprise-packages.rst +++ b/source/includes/list-mongodb-enterprise-packages.rst @@ -30,18 +30,18 @@ repository. This repository contains the following packages: :program:`mongoperf`, :program:`mongorestore`, :program:`mongostat`, and :program:`mongotop`. -Control Scripts ---------------- +Init Scripts +------------ -The ``mongodb-enterprise`` package includes various :term:`control scripts -`, including the init script ``/etc/rc.d/init.d/mongod``. +The ``mongodb-enterprise`` package includes various :term:`init scripts +`, including the init script ``/etc/rc.d/init.d/mongod``. The package configures MongoDB using the ``/etc/mongod.conf`` file in -conjunction with the control scripts. See +conjunction with the init scripts. See the :doc:`Configuration File ` reference for documentation of settings available in the configuration file. -As of version |release|, there are no control scripts for +As of version |release|, there are no init scripts for :program:`mongos`. The :program:`mongos` process is used only in :doc:`sharding `. You can use the ``mongod`` init script -to derive your own :program:`mongos` control script. +to derive your own :program:`mongos` init script. diff --git a/source/includes/list-mongodb-org-packages.rst b/source/includes/list-mongodb-org-packages.rst index d81de3cf1dd..eb977f29f79 100644 --- a/source/includes/list-mongodb-org-packages.rst +++ b/source/includes/list-mongodb-org-packages.rst @@ -30,20 +30,20 @@ repository contains the following packages: :program:`mongoperf`, :program:`mongorestore`, :program:`mongostat`, and :program:`mongotop`. -Control Scripts ---------------- +Init Scripts +------------ -The ``mongodb-org`` package includes various :term:`control scripts -`, including the init script |init-script-path|. These scripts +The ``mongodb-org`` package includes various :term:`init scripts +`, including the init script |init-script-path|. These scripts are used to stop, start, and restart daemon processes. The package configures MongoDB using the ``/etc/mongod.conf`` file in -conjunction with the control scripts. See +conjunction with the init scripts. See the :doc:`Configuration File ` reference for documentation of settings available in the configuration file. -As of version |release|, there are no control scripts for +As of version |release|, there are no init scripts for :program:`mongos`. The :program:`mongos` process is used only in :doc:`sharding `. You can use the ``mongod`` init script -to derive your own :program:`mongos` control script for use in such +to derive your own :program:`mongos` init script for use in such environments. See the :program:`mongos` reference for configuration details. diff --git a/source/includes/steps-deploy-replica-set-with-auth.yaml b/source/includes/steps-deploy-replica-set-with-auth.yaml index ecd02654850..32c087e8599 100644 --- a/source/includes/steps-deploy-replica-set-with-auth.yaml +++ b/source/includes/steps-deploy-replica-set-with-auth.yaml @@ -71,8 +71,8 @@ action: code: | mongod --config $HOME/.mongodb/config post: | - In production deployments, you can configure a :term:`control script` to - manage this process. Control scripts are beyond the scope of this document. + In production deployments, you can configure a :term:`init script` to + manage this process. Init scripts are beyond the scope of this document. --- title: "Connect to the member of the replica set where you created the administrative users." stepnum: 7 diff --git a/source/includes/steps-deploy-replica-set.yaml b/source/includes/steps-deploy-replica-set.yaml index 27b2b5bbed1..edf88878c53 100644 --- a/source/includes/steps-deploy-replica-set.yaml +++ b/source/includes/steps-deploy-replica-set.yaml @@ -1,7 +1,7 @@ # This file ref'd in steps-convert-replica-set-shard-deploy-test-data.yaml # This file is tweaked to work with the other step file, as well. # -title: +title: text: Start each member of the replica set with the appropriate options. character: "`" stepnum: 1 @@ -29,10 +29,10 @@ action: code: | mongod --config $HOME/.mongodb/config post: | - In production deployments, you can configure a :term:`control script` to - manage this process. Control scripts are beyond the scope of this document. + In production deployments, you can configure a :term:`init script` to + manage this process. Init scripts are beyond the scope of this document. --- -title: +title: text: Connect a :program:`mongo` shell to a replica set member. character: "`" stepnum: 2 @@ -45,7 +45,7 @@ action: code: | mongo --- -title: +title: text: Initiate the replica set. character: "`" stepnum: 3 @@ -60,7 +60,7 @@ post: | MongoDB initiates a set that consists of the current member and that uses the default replica set configuration. --- -title: +title: text: Verify the initial replica set configuration. character: "`" stepnum: 4 @@ -87,7 +87,7 @@ action: ] } --- -title: +title: text: Add the remaining members to the replica set. character: "`" stepnum: 5 @@ -105,7 +105,7 @@ post: | When complete, you have a fully functional replica set. The new replica set will elect a :term:`primary`. --- -title: +title: text: Check the status of the replica set. character: "`" stepnum: 6 diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index 6d3c6444202..d523c660b9e 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -22,7 +22,7 @@ deployments. You can also add comments to the configuration file to explain the server's settings. If you installed from a package and have started MongoDB using your -system's :term:`control script`, you are already using a configuration +system's :term:`init script`, you are already using a configuration file. File Format @@ -97,7 +97,7 @@ file, as in the following: mongos -f /etc/mongos.conf If you installed from a package and have started MongoDB using your -system's :term:`control script`, you are already using a configuration +system's :term:`init script`, you are already using a configuration file. Core Options diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index c669c443d1e..e21472d3d02 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -164,7 +164,7 @@ Glossary cluster requires three config servers, each on a separate machine. See :ref:`sharding-config-server`. - control script + init script A simple shell script, typically located in the ``/etc/rc.d`` or ``/etc/init.d`` directory, and used by the system's initialization process to start, restart or stop a :term:`daemon` process. @@ -1036,4 +1036,4 @@ Glossary .. [#edge-cases-2-primaries] - .. include:: /includes/footnote-two-primaries-edge-cases.rst \ No newline at end of file + .. include:: /includes/footnote-two-primaries-edge-cases.rst diff --git a/source/tutorial/expand-replica-set.txt b/source/tutorial/expand-replica-set.txt index a2ec361f6d3..2c90931df75 100644 --- a/source/tutorial/expand-replica-set.txt +++ b/source/tutorial/expand-replica-set.txt @@ -21,10 +21,10 @@ that already has seven votes, you must either add the member as a vote from an :data:`existing member `. -Control Scripts -~~~~~~~~~~~~~~~ +Init Scripts +~~~~~~~~~~~~ -In production deployments you can configure a :term:`control script` +In production deployments you can configure a :term:`init script` to manage member processes. Existing Members diff --git a/source/tutorial/install-mongodb-enterprise-on-red-hat.txt b/source/tutorial/install-mongodb-enterprise-on-red-hat.txt index 0b70a91b169..39c0210c6f1 100644 --- a/source/tutorial/install-mongodb-enterprise-on-red-hat.txt +++ b/source/tutorial/install-mongodb-enterprise-on-red-hat.txt @@ -16,7 +16,7 @@ Linux versions 5, 6, and 7 from ``.rpm`` packages. .. include:: /includes/fact-installation-64bit.rst .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. include:: /includes/list-mongodb-enterprise-packages.rst diff --git a/source/tutorial/install-mongodb-on-amazon.txt b/source/tutorial/install-mongodb-on-amazon.txt index 3c717d4eadb..2449500d38b 100644 --- a/source/tutorial/install-mongodb-on-amazon.txt +++ b/source/tutorial/install-mongodb-on-amazon.txt @@ -13,7 +13,7 @@ packages. .. include:: /includes/fact-installation-64bit.rst .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. |init-script-path| replace:: ``/etc/rc.d/init.d/mongod`` diff --git a/source/tutorial/install-mongodb-on-debian.txt b/source/tutorial/install-mongodb-on-debian.txt index 1e932e9f375..1b7d57fbe74 100644 --- a/source/tutorial/install-mongodb-on-debian.txt +++ b/source/tutorial/install-mongodb-on-debian.txt @@ -15,7 +15,7 @@ MongoDB only provides packages for 64-bit Debian "Wheezy". These packages may work with other Debian releases, but this is not a supported configuration. .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. |init-script-path| replace:: ``/etc/init.d/mongod`` .. include:: /includes/list-mongodb-org-packages.rst diff --git a/source/tutorial/install-mongodb-on-red-hat.txt b/source/tutorial/install-mongodb-on-red-hat.txt index 51a2545bf36..f49dc8da879 100644 --- a/source/tutorial/install-mongodb-on-red-hat.txt +++ b/source/tutorial/install-mongodb-on-red-hat.txt @@ -17,7 +17,7 @@ packages are generally more up to date. .. include:: /includes/fact-installation-64bit.rst .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. |init-script-path| replace:: ``/etc/rc.d/init.d/mongod`` diff --git a/source/tutorial/install-mongodb-on-suse.txt b/source/tutorial/install-mongodb-on-suse.txt index 3683367ad0f..1abbaa80471 100644 --- a/source/tutorial/install-mongodb-on-suse.txt +++ b/source/tutorial/install-mongodb-on-suse.txt @@ -17,7 +17,7 @@ date. .. include:: /includes/fact-installation-64bit.rst .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. |init-script-path| replace:: ``/etc/rc.d/init.d/mongod`` diff --git a/source/tutorial/install-mongodb-on-ubuntu.txt b/source/tutorial/install-mongodb-on-ubuntu.txt index a705fe01911..06302fa4e81 100644 --- a/source/tutorial/install-mongodb-on-ubuntu.txt +++ b/source/tutorial/install-mongodb-on-ubuntu.txt @@ -16,7 +16,7 @@ packages are generally more up-to-date. .. include:: /includes/fact-ubuntu-lts-support.rst .. The following include includes two h2 headers: -.. Packages and Control Scripts +.. Packages and Init Scripts .. |init-script-path| replace:: ``/etc/init.d/mongod`` diff --git a/source/tutorial/manage-mongodb-processes.txt b/source/tutorial/manage-mongodb-processes.txt index 9d9e11fd265..01a8356a639 100644 --- a/source/tutorial/manage-mongodb-processes.txt +++ b/source/tutorial/manage-mongodb-processes.txt @@ -129,7 +129,7 @@ the :method:`db.shutdownServer()` method as follows: use admin db.shutdownServer() -Calling the same method from a control script accomplishes the same result. +Calling the same method from a :term:`init script` accomplishes the same result. For systems with :setting:`~security.authorization` enabled, users may only issue :method:`db.shutdownServer()` when authenticated to the ``admin`` diff --git a/source/tutorial/reconfigure-replica-set-with-unavailable-members.txt b/source/tutorial/reconfigure-replica-set-with-unavailable-members.txt index 6ba7523fde5..d793ffb2861 100644 --- a/source/tutorial/reconfigure-replica-set-with-unavailable-members.txt +++ b/source/tutorial/reconfigure-replica-set-with-unavailable-members.txt @@ -111,7 +111,7 @@ Reconfigure by Turning Off Replication This option replaces the :term:`replica set` with a :term:`standalone` server. 1. Stop the surviving :program:`mongod` instances. To ensure a clean shutdown, use - an existing :term:`control script` or use the :method:`db.shutdownServer()` method. + an existing :term:`init script` or use the :method:`db.shutdownServer()` method. For example, to use the :method:`db.shutdownServer()` method, connect to the server using the :program:`mongo` shell and issue the @@ -149,7 +149,7 @@ procedure, the new primary is ``db0.example.net``. MongoDB copies the data from ``db0.example.net`` to all the other members. 1. Stop the surviving :program:`mongod` instances. To ensure a clean - shutdown, use an existing :term:`control script` or use the + shutdown, use an existing :term:`init script` or use the :method:`db.shutdownServer()` method. For example, to use the :method:`db.shutdownServer()` method, connect diff --git a/source/tutorial/recover-data-following-unexpected-shutdown.txt b/source/tutorial/recover-data-following-unexpected-shutdown.txt index 3497246effc..130395ae233 100644 --- a/source/tutorial/recover-data-following-unexpected-shutdown.txt +++ b/source/tutorial/recover-data-following-unexpected-shutdown.txt @@ -4,7 +4,7 @@ Recover Data after an Unexpected Shutdown .. default-domain:: mongodb -If MongoDB does not shutdown cleanly [#clean-shutdown]_ the on-disk +If MongoDB does not shutdown cleanly, the on-disk representation of the data files will likely reflect an inconsistent state which could lead to data corruption. [#validation]_ @@ -22,18 +22,20 @@ of a replica set, you should *always* restore from a backup or restart the :program:`mongod` instance with an empty :setting:`~storage.dbPath` and allow MongoDB to perform an initial sync to restore the data. +To ensure a clean shut down, use one of the following methods: + +* :method:`db.shutdownServer()` from the :program:`mongo` shell, +* Your system's :term:`init script`, +* "Control-C" when running :program:`mongod` in interactive mode, +* ``kill $(pidof mongod)``; or ``kill -2 $(pidof mongod)``, +* On Linux, the :option:`mongod --shutdown` option. + .. seealso:: The :doc:`/administration` documents, including :ref:`Replica Set Syncing `, and the documentation on the :option:`--repair ` :setting:`~storage.repairPath` and :setting:`storage.journal.enabled` settings. -.. [#clean-shutdown] To ensure a clean shut down, use the - :method:`db.shutdownServer()` from the :program:`mongo` shell, your - control script, the :option:`mongod --shutdown` option on Linux - systems, "Control-C" when running :program:`mongod` in interactive - mode, or ``kill $(pidof mongod)`` or ``kill -2 $(pidof mongod)``. - .. [#validation] You can also use the :method:`db.collection.validate()` method to test the integrity of a single collection. However, this process is time consuming, and without journaling you can safely