# Clusterからnodeを削除するための方法と確認方法

**URL:** <https://discuss.elastic.co/t/cluster-node/185119>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [June 11, 2019, 7:57am UTC](https://discuss.elastic.co/t/cluster-node/185119 "2019-06-11T07:57:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devdevdev](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@devdevdev](https://discuss.elastic.co/u/devdevdev)\
**Post date:** [June 11, 2019, 7:57am UTC](https://discuss.elastic.co/t/cluster-node/185119/1 "2019-06-11T07:57:11Z")

</div>

現在clusterでdatanodeを3台体制で稼働していますが、2台体制に移行したいと考えています。  
nodeを削除する前にデータを他のnodeに移動させる必要があります。  
調べたところ下記クエリを実行するとよいと聞きました。

> curl -XPUT xxx.xxx.xxx.xxx:9200/\_cluster/settings -d '{  
> "transient" :{  
> "cluster.routing.allocation.exclude.\_ip" : "xxx.xxx.xxx.yyy"  
> }  
> }';echo

実行したところ

> {"error":{"root\_cause":[{"type":"process\_cluster\_event\_timeout\_exception","reason":"failed to process cluster event (cluster\_update\_settings) within 30s"}],"type":"process\_cluster\_event\_timeout\_exception","reason":"failed to process cluster event (cluster\_update\_settings) within 30s"},"status":503}

と表示されました。

ただし  
[http://xxx.xxx.xxx.xxx:9200/\_cluster/settings?pretty=true](http://xxx.xxx.xxx.xxx:9200/_cluster/settings?pretty=true)  
を実行すると

> "transient" : {  
> "cluster" : {  
> "routing" : {  
> "allocation" : {  
> "exclude" : {  
> "\_ip" : "xxx.xxx.xxx.yyy"  
> }  
> }  
> }  
> }  
> }

と表示されていたのでクエリ自体は通った？と認識しています。

質問  
1.上記クエリ（\_cluster/settings）が表示されていたら問題ないでしょうか？  
2.上記クエリが通っていたとして、データ（shard）の振り分けが終わったことをどう確認するのでしょうか？

よろしくお願いします。

---

<div class="post-metadata">

**Author:** ![mnozawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mnozawa/32/15091_2.png) [@mnozawa](https://discuss.elastic.co/u/mnozawa)\
**Post date:** [June 11, 2019, 8:49am UTC](https://discuss.elastic.co/t/cluster-node/185119/2 "2019-06-11T08:49:27Z")

</div>

設定は反映されているだろうと思います  
分散環境ということもありタイムアウトした(時間内にレスポンスがなかった)としつつも実際は通っているという状況はたまに遭遇しますね

shardの配置を確認するには下記のリクエストを投げます

```
curl -XGET xxx.xxx.xxx.xxx:9200/_cat/allocation?v

```

これでnodeごとに配置されたshardの数やストレージの空き状況が確認できます

---

<div class="post-metadata">

**Author:** ![devdevdev](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@devdevdev](https://discuss.elastic.co/u/devdevdev)\
**Post date:** [June 11, 2019, 10:20am UTC](https://discuss.elastic.co/t/cluster-node/185119/3 "2019-06-11T10:20:03Z")

</div>

Makoto Nozawaさん

そちらのリクエストで確認してみたいと思います。  
ありがとうございました！

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 9, 2019, 10:20am UTC](https://discuss.elastic.co/t/cluster-node/185119/4 "2019-07-09T10:20:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
