Very large index , delete and recreate replica

I have a huge index which i want to split or reindex , the index has one primary and one replica shard both 118gb . I need to create a new index from the current to be able to use ILM as the index name does not fulfill the naming requirements . The issue here is i don't have sufficient space to just split the index into a new one . can set replicas to 0 , split the index, delete the old index , set replica to one again on the new index without data loss ?

The splitting of an index happens on a single node, which requires additional disk space, so I do not think that will work. IF you drop the replica you should however be able to reindex into a new index/set of indices as these can be located on the other node.

Thanks for the response
what is the likely impact of dropping the replica in the mean time
to perform re-index
and also how does the clone api work?

You will be running without a replica, so any node failures during the reindexing could lead to data loss. If the data is important I would recommend creating a snapshot before working on the index.

Cloning an index creates an exact copy, which is not what you want.

For a future purpose, does clone api also happen on a single node
@Christian_Dahlqvist

No, cloning happens in-place for each shard separately.

Do you really need to do anything to this index? 118GiB isn't all that large really, I don't think it'll cause many problems. I would suggest just leaving it alone, and using ILM-managed indices for new data only.

So , this index has the potential to become really big , has one primary shard and one replica , instead of endless scaling up the host server i want to use ILM on this index to managed it properly ... One primary shard means the entire pressure is on a single node

I also want to increase the number of primary shards on the index ..

Sure, but if you leave it alone and start using ILM for new data only then it won't grow any further.

1 Like

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