store-smb.asciidoc 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [[store-smb]]
  2. === Store SMB Plugin
  3. The Store SMB plugin works around for a bug in Windows SMB and Java on windows.
  4. [[store-smb-install]]
  5. [float]
  6. ==== Installation
  7. This plugin can be installed using the plugin manager:
  8. [source,sh]
  9. ----------------------------------------------------------------
  10. sudo bin/elasticsearch-plugin install store-smb
  11. ----------------------------------------------------------------
  12. The plugin must be installed on every node in the cluster, and each node must
  13. be restarted after installation.
  14. This plugin can be downloaded for offline install from
  15. {plugin_url}/store-smb/{version}/store-smb-{version}.zip[elastic download service].
  16. [[store-smb-remove]]
  17. [float]
  18. ==== Removal
  19. The plugin can be removed with the following command:
  20. [source,sh]
  21. ----------------------------------------------------------------
  22. sudo bin/elasticsearch-plugin remove store-smb
  23. ----------------------------------------------------------------
  24. The node must be stopped before removing the plugin.
  25. [[store-smb-usage]]
  26. ==== Working around a bug in Windows SMB and Java on windows
  27. When using a shared file system based on the SMB protocol (like Azure File Service) to store indices, the way Lucene
  28. open index segment files is with a write only flag. This is the _correct_ way to open the files, as they will only be
  29. used for writes and allows different FS implementations to optimize for it. Sadly, in windows with SMB, this disables
  30. the cache manager, causing writes to be slow. This has been described in
  31. https://issues.apache.org/jira/browse/LUCENE-6176[LUCENE-6176], but it affects each and every Java program out there!.
  32. This need and must be fixed outside of ES and/or Lucene, either in windows or OpenJDK. For now, we are providing an
  33. experimental support to open the files with read flag, but this should be considered experimental and the correct way
  34. to fix it is in OpenJDK or Windows.
  35. The Store SMB plugin provides two storage types optimized for SMB:
  36. `smb_mmap_fs`::
  37. a SMB specific implementation of the default
  38. {ref}/index-modules-store.html#mmapfs[mmap fs]
  39. `smb_simple_fs`::
  40. a SMB specific implementation of the default
  41. {ref}/index-modules-store.html#simplefs[simple fs]
  42. To use one of these specific storage types, you need to install the Store SMB plugin and restart the node.
  43. Then configure Elasticsearch to set the storage type you want.
  44. This can be configured for all indices by adding this to the `elasticsearch.yml` file:
  45. [source,yaml]
  46. ----
  47. index.store.type: smb_simple_fs
  48. ----
  49. Note that setting will be applied for newly created indices.
  50. It can also be set on a per-index basis at index creation time:
  51. [source,js]
  52. ----
  53. PUT my_index
  54. {
  55. "settings": {
  56. "index.store.type": "smb_mmap_fs"
  57. }
  58. }
  59. ----
  60. // CONSOLE