From 72a4403eef13db98d9a2dbe87e6f83ab7ac99998 Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:43:40 +0800 Subject: [PATCH] opts-for-add-hosts (#2118) * opts-for-add-hosts * Update manage-storage-host.md --- .../manage-storage-host.md | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs-2.0/4.deployment-and-installation/manage-storage-host.md b/docs-2.0/4.deployment-and-installation/manage-storage-host.md index 1191b9aedbe..168ff0a8cec 100644 --- a/docs-2.0/4.deployment-and-installation/manage-storage-host.md +++ b/docs-2.0/4.deployment-and-installation/manage-storage-host.md @@ -6,13 +6,17 @@ Starting from NebulaGraph 3.0.0, setting Storage hosts in the configuration file NebulaGraph Cloud clusters add Storage hosts automatically. Cloud users do not need to manually run `ADD HOSTS`. +## Prerequisites + +- [You have connected to the NebulaGraph database](connect-to-nebula-graph.md). + ## Add Storage hosts Add the Storage hosts to a NebulaGraph cluster. ```ngql -ADD HOSTS : [,: ...]; -ADD HOSTS "": [,"": ...]; +nebula> ADD HOSTS : [,: ...]; +nebula> ADD HOSTS "": [,"": ...]; ``` !!! note @@ -34,6 +38,22 @@ Delete the Storage hosts from cluster. You can not delete an in-use Storage host directly. Delete the associated graph space before deleting the Storage host. ```ngql -DROP HOSTS : [,: ...]; -DROP HOSTS "": [,"": ...]; +nebula> DROP HOSTS : [,: ...]; +nebula> DROP HOSTS "": [,"": ...]; +``` + + +## View Storage hosts + +View the Storage hosts in the cluster. + +```ngql +nebula> SHOW HOSTS STORAGE; ++-------------+------+----------+-----------+--------------+----------------------+ +| Host | Port | Status | Role | Git Info Sha | Version | ++-------------+------+----------+-----------+--------------+----------------------+ +| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "{{nebula.release}}" | +| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "{{nebula.release}}" | +| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "{{nebula.release}}" | ++-------------+------+----------+-----------+--------------+--------------- ------+ ```