使用從主要資料中心匯出的 OVA 檔案在次要資料中心建立節點後,您必須手動為次要叢集中的所有節點設定 cluster.initial\_master\_nodes 內容值,以便讓次要資料中心節點形成 OpenSearch 叢集。
使用您針對次要資料中心內的第一個節點所輸入的相同內容值,來設定次要資料中心中的每個節點。
程序
-
在次要資料中心的第一個節點中,存取要編輯的檔案。
請連絡支援團隊以獲得正確的輸入。
-
編輯下列字行,以新增 cluster.initial_master_nodes 內容值作為次要資料中心第一個節點的 FQDN。
cluster.initial_master_nodes: firstnode.fqdn.from.secondary.site -
使用相同的內容值,來設定次要資料中心內的每個節點。
-
在所有節點上重新啟動 OpenSearch 服務。
\{ \{service opensearch restart \} \} -
確認已在所有節點上正確設定了 OpenSearch 叢集。
curl 'http://localhost:9200/\_cluster/health?pretty'這個用來確認 OpenSearch 健全狀況的命令應會傳回如下的結果。
{ "cluster_name" : "horizon", "status" : "green", "timed_out" : false, "number_of_nodes" : 3, "number_of_data_nodes" : 3, "discovered_master" : true, "active_primary_shards" : 90, "active_shards" : 180, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 100.0 }
後續步驟
設定次要資料中心內的節點以進行 OpenSearch 複寫。
此頁面對您有幫助嗎?