>>>>> Steinar Bang <[email protected]>:

> Ie. they startet working, *if* /mnt/elasticsearch existed and *if* it
> was writable by elasticsearch.

> So I need to these commands when the EC2 instance wakes up, and before
> the ES server is started:
>  mkdir -p /mnt/elasticsearch
>  chown elasticsearch.elasticsearch /mnt/elasticsearch

> Is there an easy way to do this from the /etc/init.d/elasticsearch
> script, before the process user is changed from root to elasticsearch, I
> wonder...?

What I did to get things working automatically, was to add these lines
to the /etc/rc.local file:
 # Create a volatile disk directory for elastiscsearch to work on               
                                                                                
                   
 # The ES index will be recreated from the last checkpoint in S3                
                                                                                
                   
 mkdir -p /mnt/elasticsearch
 chown elasticsearch.elasticsearch /mnt/elasticsearch/

This made ES start correctly, and start restoring the saved index when
started during the boot.  ES was up with a restored 25.5GB index in
around 10-15 minutes after the EC2 instance boot.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/87k3endzy6.fsf%40dod.no.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to