My ES cluster is currently running out of disk space. The new disks are still being purchased. I want to try my best to preserve my data, so I'm using the method of deleting replicas to cope with the current situation.
The index to be operated on is a historical index managed by ilm, and there will only be query operations, no write operations. If I directly set the copy to 0, it will cause the node disk to become unbalanced. If the operation of modifying the shard role is supported, it would be much more convenient. I just need to evenly distribute the main shard to each node, and then set the copy to 0 to achieve my goal . Currently, the shard distribution of shards is like this:
index shard prirep state docs store ip node
iwc_aime_dialog_record-2025.06.06-000017 0 p STARTED 36475406 116.9gb 10.201.223.142 iwc-index-aie21-es-data-nodes_10.201.223.142
iwc_aime_dialog_record-2025.06.06-000017 1 p STARTED 36486635 117gb 10.201.223.142 iwc-index-aie21-es-data-nodes_10.201.223.142
iwc_aime_dialog_record-2025.06.06-000017 2 p STARTED 36451906 116.8gb 10.201.155.68 iwc-index-aie21-es-data-nodes_10.201.155.68
iwc_aime_dialog_record-2025.06.06-000017 3 p STARTED 36474449 117gb 10.201.155.68 iwc-index-aie21-es-data-nodes_10.201.155.68
iwc_aime_dialog_record-2025.06.06-000017 4 p STARTED 36483364 117gb 10.201.150.36 iwc-index-aie21-es-data-nodes_10.201.150.36
iwc_aime_dialog_record-2025.06.06-000017 5 p STARTED 36505509 117.1gb 10.201.150.36 iwc-index-aie21-es-data-nodes_10.201.150.36
iwc_aime_dialog_record-2025.06.06-000017 0 r STARTED 36475406 116.9gb 10.201.234.192 iwc-index-aie21-es-data-nodes_10.201.234.192
iwc_aime_dialog_record-2025.06.06-000017 1 r STARTED 36486635 117gb 10.201.234.192 iwc-index-aie21-es-data-nodes_10.201.234.192
iwc_aime_dialog_record-2025.06.06-000017 2 r STARTED 36451906 116.8gb 10.201.171.69 iwc-index-aie21-es-data-nodes_10.201.171.69
iwc_aime_dialog_record-2025.06.06-000017 3 r STARTED 36474449 116.9gb 10.201.171.69 iwc-index-aie21-es-data-nodes_10.201.171.69
iwc_aime_dialog_record-2025.06.06-000017 4 r STARTED 36483364 116.9gb 10.201.139.80 iwc-index-aie21-es-data-nodes_10.201.139.80
iwc_aime_dialog_record-2025.06.06-000017 5 r STARTED 36505509 117.1gb 10.201.139.80 iwc-index-aie21-es-data-nodes_10.201.139.80