- Windows UNC Path

A question for my configuration:

When I setup a ES cluster on Windows, i'm able to define the to (example) : S:\DataShare (which is locally a disk)

When I map a network drive (so a UNC share to another server like \computer\ES1Datashare) to M: and map that to M:\ES1Datashare, this doesn't work:

[2016-11-10 16:45:36,220][INFO ][node ] [esdata-3] version[1.7.5], pid[12652], build[00f95f4/2016-02-02T09:55:30Z]
[2016-11-10 16:45:36,220][INFO ][node ] [esdata-3] initializing ...
[2016-11-10 16:45:36,345][INFO ][plugins ] [esdata-3] loaded [], sites []
[2016-11-10 16:45:36,392][ERROR][bootstrap ] Exception
org.elasticsearch.ElasticsearchIllegalStateException: Failed to created node environment
at org.elasticsearch.node.internal.InternalNode.(
at org.elasticsearch.bootstrap.Bootstrap.setup(
at org.elasticsearch.bootstrap.Bootstrap.main(
at org.elasticsearch.bootstrap.Elasticsearch.main(
Caused by: java.nio.file.FileSystemException: W:\ES-Data-3-Store\elasticcluster\nodes\0: Unable to determine if root directory exists
at java.nio.file.Files.createDirectories(Unknown Source)
at org.elasticsearch.env.NodeEnvironment.(
at org.elasticsearch.node.internal.InternalNode.(
... 4 more

Is it even possible to add a Windows share to the config?

Thanks in advance.

Using network dirs is a bad idea in general.
You should prefer local disk.


Qre you running ES with your own user account? Drive mappings are a per-user thing in windows. The ES service runs as system by default, so it won't have access to your user account's drive mapping.

1 Like

So changing the Log On account to an AD-user will bypass this?

How does this effect the ES-security model?

Thanks for your replies.

I'm just stating that if you have mapped a drive using a different user than you're running ES with, it will definetely not work.

I was able to to bypass this by using the following:

I ran the ElasticSearch application as an Active Directory User who has access to the newly created share.

Afterwards I created a link in Windows to make the network path accessible by a local Windows path:

  • command prompt as Administrator:
    mklink /D E:[Foldername to create] [networkshare]
    mklink /D e:\ES-Data3-Store \networkshare\datastoreforES

Afterwards I updated my to the new local share: E:\ES-Data3-Store

ElasticSearch node boots without issue.

Extra notes:
I'm aware that this is not best practice since there will be a latency on accessing a network share rather than directly connecting to a windows local (SSD) disk.

What are the security risks by using this method?

I don't see any special risk with this setup. It might even be a good option - newer versions of the SMB proticol (SMB 3.0) is very geared towards running workloads using a network share (both hyper-v vms and sql databases are supported and encouraged to run over smb3), so this setup might in fact be very viable, tho not something that's likely tested by many.

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