You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2023/08/16 09:02:00 UTC

[GitHub] [ozone] ChenSammi commented on a diff in pull request #5146: HDDS-9037. Provide documentation for Decommissioning in Ozone

ChenSammi commented on code in PR #5146:
URL: https://github.com/apache/ozone/pull/5146#discussion_r1295598283


##########
hadoop-hdds/docs/content/feature/Decommission.md:
##########
@@ -0,0 +1,88 @@
+---
+title: "Decommissioning"
+weight: 1
+menu:
+   main:
+      parent: Features
+summary: Decommissioning of SCM, OM and Datanode.
+---
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+#DataNode Decommission
+
+The DataNode decommission is the process that removes the existing DataNode from the Ozone cluster while ensuring that the new data should not be written to the decommissioned DataNode. When you initiate the process of decommissioning a DataNode, Ozone automatically ensures that all the storage containers on that DataNode have an additional copy created on another DataNode before the decommission completes. So, datanode will keep running after it has been decommissioned and may be used for reads, but not for writes until it is stopped manually.
+
+When we initiate the process of decommissioning, first we check the current state of the node, ideally it should be "IN_SERVICE", then we change it's state to "DECOMMISSIONING" and start the process of decommissioning, it goes through a workflow where the following happens:
+
+1. First an event is fired to close any pipelines on the node, which will also close any containers.
+
+2. Next the containers on the node are obtained and checked to see if new replicas are needed. If so, the new replicas are scheduled.
+
+3. After scheduling replication, the node remains pending until replication has completed.
+
+4. At this stage the node will complete the decommission process and the state of the node will be changed to "DECOMMISSIONED".
+
+To check the current state of the datanodes we can execute the following command,
+```shell
+ozone admin datanode list
+```
+
+
+To decommission a datanode you can execute the following command in cli,
+
+```shell
+ozone admin datanode decommission [-hV] [-id=<scmServiceId>]
+       [--scm=<scm>] [<hosts>...]
+```
+You can enter multiple hosts to decommission multiple datanodes together.
+
+**Note:** To recommission a datanode you may execute the below command in cli,
+```shell
+ozone admin datanode recommission [-hV] [-id=<scmServiceId>]
+       [--scm=<scm>] [<hosts>...]
+```
+
+## OM Decommission
+
+Ozone Manager (OM) decommissioning is the process in which you gracefully remove one of the OM from the OM HA Ring.
+
+To decommission an OM and remove the node from the OM HA ring, the following steps need to be executed.
+1. Stop the OzoneManager process only on the node which needs to be decommissioned. <p> **Note -** Do not stop the decommissioning OM if there are

Review Comment:
   Is stop the OM a must step before decommission? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org