# Control primary/replica placement?

**URL:** <https://discuss.elastic.co/t/control-primary-replica-placement/19745>\
**Category:** Elasticsearch\
**Created:** [September 11, 2014, 8:55pm UTC](https://discuss.elastic.co/t/control-primary-replica-placement/19745 "2014-09-11T20:55:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slushi](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@slushi](https://discuss.elastic.co/u/slushi)\
**Post date:** [September 11, 2014, 8:55pm UTC](https://discuss.elastic.co/t/control-primary-replica-placement/19745/1 "2014-09-11T20:55:51Z")

</div>

I have a setup where I have some machines with SSD drives and others with  
slower spinning disks. I have some indices that I would like to place on  
the SSD machines so those requests are served more quickly. I have used  
allocation filtering thus far and it's worked well. However I am running  
out of space on the SSD drives and would still like to put more data there.  
I noticed there is a "preference" setting in searches that allow requests  
to prefer primary shards. So I was thinking that perhaps I could place only  
primary shards on the SSD machines and have the replicas on the spinning  
disks (other than disk space, the machines are not close to capacity at  
all). I looked through the documentation and I don't see any configuration  
settings to allow this. The closest thing I found was awareness, but that's  
not quite it: I could keep a full copy of the data would be on the SSD  
machines, but not necessarily the primary shards. And the search request  
"preference" also doesn't seem to allow for restricting the search to a set  
of nodes. Is there some way to do this? The only other thing I could think  
of was perhaps periodically running some cluster re-route script to try to  
keep the primary shards on the SSD machines but that seems pretty hacky and  
I'm not sure it would actually work reliably.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2d921ec3-8e0f-4a6f-aa7f-80e8dd7896e3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2d921ec3-8e0f-4a6f-aa7f-80e8dd7896e3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:02am UTC](https://discuss.elastic.co/t/control-primary-replica-placement/19745/2 "2017-07-06T01:02:59Z")

</div>


