{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/11065","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11065/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11065/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11065/events","html_url":"https://github.com/elastic/elasticsearch/pull/11065","id":74435382,"number":11065,"title":"Add `path.shared_data`, change `index.data_path` to be relative","user":{"login":"dakrone","id":19060,"avatar_url":"https://avatars.githubusercontent.com/u/19060?v=3","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Shadow%20Replicas","name":":Shadow Replicas","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.0.0","name":"v2.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-08T17:25:34Z","updated_at":"2015-05-08T17:49:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11065","html_url":"https://github.com/elastic/elasticsearch/pull/11065","diff_url":"https://github.com/elastic/elasticsearch/pull/11065.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/11065.patch"},"body":"This allows `path.shared_data` to be added to the security manager while\r\nstill allowing a custom `data_path` for indices using shadow replicas.\r\n\r\nFor example, configuring `path.shared_data: /tmp/foo`, then created an\r\nindex with:\r\n\r\n```\r\nPOST /myindex\r\n{\r\n  \"index\": {\r\n    \"number_of_shards\": 1,\r\n    \"number_of_replicas\": 1,\r\n    \"data_path\": \"bar/baz\",\r\n    \"shadow_replicas\": true\r\n  }\r\n}\r\n```\r\n\r\nThe index will then reside in `/tmp/foo/bar/baz`.\r\n\r\n`path.shared_data` defaults to `${path.home}/data` if not specified."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/100310447","html_url":"https://github.com/elastic/elasticsearch/pull/11065#issuecomment-100310447","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11065","id":100310447,"user":{"login":"dakrone","id":19060,"avatar_url":"https://avatars.githubusercontent.com/u/19060?v=3","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T17:49:36Z","updated_at":"2015-05-08T17:49:36Z","body":"Custom index paths are used for specifying where an index should be allocated, specifically for indices using shared filesystems.\r\n\r\nSo, if you had a shared FS mounted on `/mnt/sharedfs/data`, currently you would create an index with these settings:\r\n\r\n```\r\nPOST /myindex\r\n{\r\n  \"index\": {\r\n    \"number_of_shards\": 1,\r\n    \"number_of_replicas\": 1,\r\n    \"data_path\": \"/mnt/sharedfs/data/indices\",\r\n    \"shadow_replicas\": true\r\n  }\r\n}\r\n```\r\n\r\nIt is outside the regular `path.data` setting because we need both a shared part (the index data) and a non-shared part (shard and index state that is per-node and should not be visible to all nodes). So `/mnt/sharedfs/data/indices` is used for the Lucene index itself and `path.data` is used for all the non-shared state files."}}