[[quota-aware-fs]]
=== Quota-aware Filesystem Plugin

NOTE: {cloud-only}

The Quota-aware Filesystem plugin adds an interface for telling
Elasticsearch the disk-quota limits under which it is operating.

:plugin_name: quota-aware-fs
include::install_remove.asciidoc[]

[[quota-aware-fs-usage]]
==== Passing disk quota information to Elasticsearch

{es} considers the available disk space on a node before deciding whether
to allocate new shards to that node or to actively relocate shards away from that node.
However, while the JVM has support for reporting a filesystem's total space and available
space, it has no knowledge of any quota limits imposed on the user under which {es} is
running. Consequently, the {es} mechanisms for handling low disk space situations cannot
function. To work around this situation, this plugin provides a mechanism for supplying quota-ware
total and available amounts of disk space.

To use the plugin, install it on all nodes and restart them. You must configure the plugin
by supplying the `es.fs.quota.file` {ref}/jvm-options.html[JVM system property] on startup. This
property specifies a URI to a properties file, which contains the total and available
amounts.

NOTE: {es} will not start successfully if you install the `quota-aware-fs` plugin,
but you do not supply the `es.fs.quota.file` system property at startup.

[source,text]
----
-Des.fs.quota.file=file:///path/to/some.properties
----

The properties file must contain the keys `total` and `remaining`, both of which contain the respective
number in bytes. You are responsible for writing this file with the correct values, and keeping the
values up-to-date. {es} will poll this file regularly to pick up any changes.

[source,properties]
----
total=976490576
remaining=376785728
----
