Error while restoring snapshot

Hello, i'm getting this error while restoring my snapshot

snapshotname: elasticindexsnapshot
repo name : snapshotrepo
directory: /home/snapshotrepo

I have changed the elasticsearch.yml and updated it :

path.repo: /home/snapshotrepo

i have also created a snapshot in /home/snapshotrepo

But when i'm trying to run:

curl -XPUT 'http://localhost:9200/_snapshot/snapshotrepo' -d '{ "type": "fs", "settings": { "location": "/home/snapshotrepo", "compress": true }}'

I'm getting this error, please help me out.

{"error":"RepositoryVerificationException[[snapshotrepo] [__rBB01USK-r_OzLuGIDTA, 'RemoteTransportException[[H.E.R.B.I.E.][inet[/46.101.58.191:9300]][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[snapshotrepo] store location [/home/snapshotrepo] is not shared between node [[H.E.R.B.I.E.][__rBB01USK-r_OzLuGIDTA][elk-test-2][inet[/46.101.58.191:9300]]{master=true}] and the master node]; ']]]","status":500}

That's because it expects a shared filesystem and will check is this is in fact the case.

You can bypass this via ?verify=false butdo that at your own peril.

Thanks for reply,

But i want to use shared file system as i have two different nodes running on two different servers and i want to restore my snapshot from one server to another.

What sort of file system is the repository - NFS, something else?

Yes NFS
But i have fixed this , successful in restoring a snapshot from one to the other.