# Elastic stack installation issue with NFS

**URL:** <https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414>\
**Category:** Elasticsearch\
**Created:** [October 25, 2024, 9:54am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414 "2024-10-25T09:54:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bminano](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bminano](https://discuss.elastic.co/u/bminano)\
**Post date:** [October 25, 2024, 9:54am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/1 "2024-10-25T09:54:58Z")

</div>

Hi,

I installed a basic self-managed Elastic Stack successfully. But I was trying to change path.data to use a NFS mounted path in the server.  
When I try to start the elasticsearch service I get the following error:

```auto
java.lang.IllegalStateException: failed to obtain node locks, tried [/app/elastic]; maybe these locations are not writable or multiple nodes were started on the same data path?
...
Caused by: java.io.IOException: failed to obtain lock on /app/elastic
...
Caused by: java.nio.file.AccessDeniedException: /app/elastic/node.lock

```

The fact is that the file is created, but empty.

```auto
[jboss@sdeselklin1 app]$ ls -l elastic/
total 32
-rwxrwx---. 1 elasticsearch elasticsearch 0 25 oct. 11:46 node.lock

```

I have tried to create a file manually and the nfs is working.  
The owner and group for the full path is also elasticsearch.

So I am very confused. Any hint?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 25, 2024, 10:40am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/2 "2024-10-25T10:40:13Z")

</div>

The file system backing the `path.data` must [as outlined in the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#data-path) behave like a local disk. This is often not the case when you use an NFS monted volume, so I suspect this is your issue. Using NFS storage also often results in very poor performance even when it does work and is correctly configured, so I would recommend against using it.

---

<div class="post-metadata">

**Author:** ![bminano](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bminano](https://discuss.elastic.co/u/bminano)\
**Post date:** [October 25, 2024, 10:54am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/3 "2024-10-25T10:54:24Z")

</div>

I read the documentation but I don't fully understand what "behave like a local disk" mean. Since the path is mounted in the server, you can interact as a local disk. Do you have any suggestion on mount parameters?

We have tried these two configurations.  
isinfsdg:/elastic /app/elastic nfs rw,bg,hard,nointr,tcp,vers=3 0 0  
isinfsdg:/elastic /app/elastic nfs defaults 0 0

Regarding the poor performance, I know, we are beginning with the stack and need to test with nfs disk space. Unfortunately I cannot decide right now. If we see very very poor performance we'll think on moving to a different filesystem.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 25, 2024, 10:58am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/4 "2024-10-25T10:58:51Z")

</div>

I have never used Elasticsearch with NFS so do not even know if it is possible for it to work nor how to configure it it if it is. It is not just about being able to read or write to the file system as file locking, durability guarantees and other low-level operations also need to match that of a local disk. Elasticsearch can be very I/O intensive and can put a lot of strain on the storage. You probably need a good system administrator with extensive NFS experience to get it to work as I have seen a lot of people struggle with it over the years.

---

<div class="post-metadata">

**Author:** ![pestevao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pestevao/32/44138_2.png) [@pestevao](https://discuss.elastic.co/u/pestevao)\
**Post date:** [October 26, 2024, 10:59am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/5 "2024-10-26T10:59:12Z")

</div>

```auto
java.nio.file.AccessDeniedException

```

Maybe just a permission issue? Elastic user seems to not have access to the path.

Greetings, Pedro

---

<div class="post-metadata">

**Author:** ![bminano](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bminano](https://discuss.elastic.co/u/bminano)\
**Post date:** [October 28, 2024, 10:30am UTC](https://discuss.elastic.co/t/elastic-stack-installation-issue-with-nfs/369414/6 "2024-10-28T10:30:30Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> I have never used Elasticsearch with NFS so do not even know if it is possible for it to work nor how to configure it it if it is. It is not just about being able to read or write to the file system as file locking, durability guarantees and other low-level operations also need to match that of a local disk. Elasticsearch can be very I/O intensive and can put a lot of strain on the storage.

Maybe, but the directory and preceding directory has the proper permissions for elasticsearch user and group. In fact, the file is created (but with no bytes)

I just checked the creation time in detail, the error log is at 11:46:13,466. The creation date of the file is 11:46:13.520169000. So I think the problem is that our NFS system is slower that elasticsearch can work with.

I close the topic
