Snapshot and restore using shared file system

When using a cluster with more than one node is not enough to create local folders for shared fs repo. you need smb/nfs mounted drive because each node will check the "repo" and if there is no communication between nodes via the repo, then it will not work. if each node can not see data put by other nodes, then the repo will not be available. how?

Hello and welcome,

Not sure what is your issue, can you provide more context? It is not clear.

If you want to use a filesystem to store your snapshots, you need a shared filesystem that needs to be accessible in every data and master nodes, if the shared filesystem is not accessible in every data and master nodes of your cluster it will not work.

Thank you for your response,

I had problem like I need to share my snapshots to my local system ,I tried it first with file sharing method but, it failed to allocate the file System in windows . Here I use yaml file to mount the volume but they denies the access from cluster(Eg:AccessDeniedException).

You need to share both your configuration and the log error you received.

warning: ignoring JAVA_HOME=/opt/bitnami/java; using ES_JAVA_HOME
[2023-06-20T10:09:53,801][ERROR][o.e.b.Elasticsearch      ] [elasticsearch-data-0] fatal exception while booting Elasticsearch java.lang.IllegalStateException: Unable to access 'path.repo' (/opt/bitnami/elasticsearch/\\WINDOW-INST/elasticbackupath)
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Security.addFilePermissions(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Security.createPermissions(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Security.configure(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Elasticsearch.initPhase2(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Elasticsearch.main(
Caused by: java.nio.file.AccessDeniedException: /opt/bitnami/elasticsearch/\\WINDOW-INST
        at java.base/sun.nio.fs.UnixException.translateToIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(
        at java.base/java.nio.file.Files.createDirectory(
        at java.base/java.nio.file.Files.createAndCheckIsDirectory(
        at java.base/java.nio.file.Files.createDirectories(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.Security.ensureDirectoryExists(
        at org.elasticsearch.server@8.8.0/org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(
        ... 5 more

ERROR: Elasticsearch did not exit normally - check the logs at /opt/bitnami/elasticsearch/logs/elastic.log

ERROR: Elasticsearch exited unexpectedly

given helm script value as nfs path
@param snapshotRepoPath File System snapshot repository path
ref: containers/bitnami/elasticsearch at main · bitnami/containers · GitHub

snapshotRepoPath: \WINDOW-INST/elasticbackupath

This is a little confusing and does not looks like a valid path.

You are running elasticsearch on linux, and this is not how you mount a windows share on linux, you need to mount it correctly, which is more an infrastructure issue than an elasticsearch one.

You need to mount your windows share on your linux machine and use this mount point as the path for your repository, for example, assume that you are mounting your windows share on /mnt/snapshots, this is the path you need to use in path.repo.

The way you did will not work.

How you will mount your windows share depends on your infrastrucutre, but normally on a linux machine you need to have cifs-utils installed and mount it in this way:

sudo mount -t cifs -o username=<win_share_user> //WIN_SHARE_IP/<share_name> /mnt/win_share

I'm not sure how this would work on kubernetes since I do not use it.

do I can mount them using yaml files sudo mount -t cifs -o username=<win_share_user> //WIN_SHARE_IP/<share_name> /mnt/win_share since i am trying to connect it with mylocal file system.

As I said, I'm not sure how you will do this, I do not use Kubernetes, but you need to fin a way to correctly mount this Windows Share on your Kubernetes Pods.

This is an infrastructure issue, not an Elasticsearch one.

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