# Saving Elasticsearch indices to drive spare drive so root drive willl not be full

**URL:** <https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448>\
**Category:** Elasticsearch\
**Created:** [September 24, 2016, 8:19pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448 "2016-09-24T20:19:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravikumar\_G](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravikumar\_G](https://discuss.elastic.co/u/Ravikumar_G)\
**Post date:** [September 24, 2016, 8:19pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/1 "2016-09-24T20:19:41Z")

</div>

Hi,  
I have recently setup a ElasticSearch server which is running on Centos 7.2  
which is dell 720 with 2 root drive configured in raid 1 mirrored  
4tb x 12 configured in Raid with 45Tb which is /dev/sdb1 44T 31M 42T 1% /data/0  
[root@elkhost]# df -h  
Filesystem Size Used Avail Use% Mounted on  
/dev/mapper/centos-root 50G 17G 34G 34% /  
devtmpfs 95G 4.0K 95G 1% /dev  
tmpfs 95G 0 95G 0% /dev/shm  
tmpfs 95G 17M 95G 1% /run  
tmpfs 95G 0 95G 0% /sys/fs/cgroup  
/dev/sda1 497M 165M 332M 34% /boot  
/dev/mapper/centos-home 82G 33M 82G 1% /home  
/dev/sdb1 44T 31M 42T 1% /data/0  
tmpfs 19G 0 19G 0% /run/user/0

elasticsearch.yml

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path:  
logs: /path/data/0/log/  
data: /path/data/0

I want to save data in /data/0 which is 44 TB so root drive will not get full with data, Any input will be helpful

[root@elkhost indices]# pwd  
/var/lib/elasticsearch/elknode/nodes/0/indices  
[root@elkhost indices]#

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 24, 2016, 10:13pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/2 "2016-09-24T22:13:30Z")

</div>

Is the `path.data` change not working?

---

<div class="post-metadata">

**Author:** ![Ravikumar\_G](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravikumar\_G](https://discuss.elastic.co/u/Ravikumar_G)\
**Post date:** [September 24, 2016, 10:24pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/3 "2016-09-24T22:24:34Z")

</div>

Yes if

[root@elasticsearch 0]# service elasticsearch status  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)  
Active: failed (Result: exit-code) since Fri 2016-09-23 17:14:20 EDT; 2min 44s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 17205 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID\_DIR}/elasticsearch.pid -Des.default.path.home=${ES\_HOME} -Des.default.path.logs=${LOG\_DIR} -Des.default.path.data=${DATA\_DIR} -Des.default.path.conf=${CONF\_DIR} (code=exited, status=1/FAILURE)  
Process: 17202 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
Main PID: 17205 (code=exited, status=1/FAILURE)

Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)  
Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Security.configure(Security.java:118)  
Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)  
Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)  
Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)  
Sep 23 17:14:20 elasticsearch[17205]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
Sep 23 17:14:20 elasticsearch[17205]: Refer to the log for complete error details.  
Sep 23 17:14:20 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Sep 23 17:14:20 systemd[1]: Unit elasticsearch.service entered failed state.  
Sep 23 17:14:20 systemd[1]: elasticsearch.service failed.

---

<div class="post-metadata">

**Author:** ![Ravikumar\_G](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravikumar\_G](https://discuss.elastic.co/u/Ravikumar_G)\
**Post date:** [September 24, 2016, 10:51pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/4 "2016-09-24T22:51:16Z")

</div>

Currently i changed the path of path.data in elasticsearch.yml  
still logs been saving in root drive which is  
[root@elkhost]# du -sh  
5.1G .  
[root@elkhost]# pwd  
/var/lib/elasticsearch/qdnelklab/nodes  
[root@elkhost nodes]#  
path:  
logs: /path/data/0/log/  
data: /path/data/0

[root@elkhost ~]# df -h  
Filesystem Size Used Avail Use% Mounted on  
/dev/mapper/centos-root 50G 12G 39G 24% /  
devtmpfs 95G 4.0K 95G 1% /dev  
tmpfs 95G 0 95G 0% /dev/shm  
tmpfs 95G 17M 95G 1% /run  
tmpfs 95G 0 95G 0% /sys/fs/cgroup  
/dev/sda1 497M 165M 332M 34% /boot  
/dev/mapper/centos-home 82G 33M 82G 1% /home  
/dev/sdb1 44T 34M 42T 1% /data/0  
tmpfs 19G 0 19G 0% /run/user/0  
[root@elkhost ~]# cd /var/log/elasticsearch/q  
qdnelklab\_deprecation.log qdnelklab\_index\_search\_slowlog.log qndelklab\_deprecation.log qndelklab\_index\_search\_slowlog.log  
qdnelklab\_index\_indexing\_slowlog.log qdnelklab.log qndelklab\_index\_indexing\_slowlog.log qndelklab.log  
[root@elkhost ~]# cd /var/lib/  
alternatives/ dbus/ docker/ initramfs/ logstash/ NetworkManager/ polkit-1/ rpm-state/ sfcb/ tpm/  
authconfig/ dhclient/ elasticsearch/ kibana/ machines/ os-prober/ postfix/ rsyslog/ stateless/ yum/  
dav/ dnsmasq/ games/ logrotate.status misc/ plymouth/ rpm/ selinux/ systemd/  
[root@elkhost ~]# cd /var/lib/elasticsearch/  
elasticsearch/ elklab/ qdnelklab/ qndelklab/ qndlklab/  
[root@~]# cd /var/lib/elasticsearch/qdnelklab/  
[root@]# ls  
nodes  
[root@]# cd nodes/  
[root@]# du -sh  
5.1G .  
[root@]# pwd  
/var/lib/elasticsearch/qdnelklab/nodes  
[root@]#

---

<div class="post-metadata">

**Author:** ![Ravikumar\_G](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravikumar\_G](https://discuss.elastic.co/u/Ravikumar_G)\
**Post date:** [September 25, 2016, 1:48am UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/5 "2016-09-25T01:48:19Z")

</div>

[root@hostelasticsearch]# pwd  
/var/lib/elasticsearch

followed steps in the link but still no luck logs still saving in above mentioned path

> [@How to move Data and Logs to new directory?](https://discuss.elastic.co/t/how-to-move-data-and-logs-to-new-directory/28382):
>
> I installed ElasticSearch using defaults. Now my /var directory is full. I'd like to move ES to a different partition on the server without losing data. Can this be done and if so, how? More specifically, I'd like to move data and logs to /spare \> Filesystem Size Used Avail Use% Mounted on /dev/sda6 969M 341M 562M 38% / devtmpfs 16G 0 16G 0% /dev tmpfs 16G 0 16G 0% /dev/shm tmpfs 16G 1.6G 15G 10% /run tmpfs 16G…

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 25, 2016, 7:15am UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/6 "2016-09-25T07:15:36Z")

</div>

Looks like ES doesn't have permissions to the mount?

---

<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 5, 2017, 10:17pm UTC](https://discuss.elastic.co/t/saving-elasticsearch-indices-to-drive-spare-drive-so-root-drive-willl-not-be-full/61448/7 "2017-07-05T22:17:27Z")

</div>


