summaryrefslogtreecommitdiffstats
path: root/doc/admin-guide/en-US/admin_directory_Quota.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/admin-guide/en-US/admin_directory_Quota.xml')
-rw-r--r--doc/admin-guide/en-US/admin_directory_Quota.xml179
1 files changed, 179 insertions, 0 deletions
diff --git a/doc/admin-guide/en-US/admin_directory_Quota.xml b/doc/admin-guide/en-US/admin_directory_Quota.xml
new file mode 100644
index 00000000000..8a1012a6ac2
--- /dev/null
+++ b/doc/admin-guide/en-US/admin_directory_Quota.xml
@@ -0,0 +1,179 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "docbookV4.5/docbookx.dtd" []>
+<chapter id="chap-Administration_Guide-Dir_Quota">
+ <title>Managing Directory Quota </title>
+ <para>Directory quotas in GlusterFS allow you to set limits on usage of disk space by directories or volumes.
+The storage administrators can control the disk space utilization at the directory and/or volume
+levels in GlusterFS by setting limits to allocatable disk space at any level in the volume and directory
+hierarchy. This is particularly useful in cloud deployments to facilitate utility billing model.
+ </para>
+ <para> <note>
+ <para>For now, only Hard limit is supported. Here, the limit cannot be exceeded and attempts to use
+more disk space or inodes beyond the set limit will be denied.
+</para>
+ </note></para>
+ <para>System administrators can also monitor the resource utilization to limit the storage for the users
+depending on their role in the organization.
+</para>
+ <para>You can set the quota at the following levels:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Directory level – limits the usage at the directory level
+ </para>
+ </listitem>
+ <listitem>
+ <para>Volume level – limits the usage at the volume level
+ </para>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <para>You can set the disk limit on the directory even if it is not created. The disk limit is enforced
+immediately after creating that directory. For more information on setting disk limit, see <xref linkend="chap-Administration_Guide-Dir_Quota-Set_Replace"/>.
+</para>
+ </note>
+ <section id="chap-Administration_Guide-Dir_Quota-Enable">
+ <title>Enabling Quota </title>
+ <para>You must enable Quota to set disk limits.
+</para>
+ <para><emphasis role="bold">To enable quota</emphasis>
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Enable the quota using the following command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> enable </command></para>
+ <para>For example, to enable quota on test-volume:
+</para>
+ <programlisting># gluster volume quota test-volume enable
+Quota is enabled on /test-volume</programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="chap-Administration_Guide-Dir_Quota-Disable">
+ <title>Disabling Quota </title>
+ <para>You can disable Quota, if needed.
+</para>
+ <para><emphasis role="bold">To disable quota:</emphasis>
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Disable the quota using the following command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> disable </command></para>
+ <para>For example, to disable quota translator on test-volume:
+</para>
+ <programlisting># gluster volume quota test-volume disable
+Quota translator is disabled on /test-volume</programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="chap-Administration_Guide-Dir_Quota-Set_Replace">
+ <title>Setting or Replacing Disk Limit </title>
+ <para>You can create new directories in your storage environment and set the disk limit or set disk limit for
+the existing directories. The directory name should be relative to the volume with the export
+directory/mount being treated as &quot;/&quot;.
+</para>
+ <para><emphasis role="bold">To set or replace disk limit</emphasis>
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Set the disk limit using the following command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> limit-usage /<replaceable>directory</replaceable><replaceable>limit-value</replaceable></command></para>
+ <para>For example, to set limit on data directory on test-volume where data is a directory under the
+export directory:
+</para>
+ <programlisting># gluster volume quota test-volume limit-usage /data 10GB
+Usage limit has been set on /data</programlisting>
+ <para><note>
+ <para>In a multi-level directory hierarchy, the strictest disk limit will be considered for enforcement.
+</para>
+ </note></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="chap-Administration_Guide-Dir_Quota-Display">
+ <title>Displaying Disk Limit Information </title>
+ <para>You can display disk limit information on all the directories on which the limit is set.
+</para>
+ <para><emphasis role="bold">To display disk limit information</emphasis>
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Display disk limit information of all the directories on which limit is set, using the following
+command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> list</command>
+</para>
+ <para>For example, to see the set disks limit on test-volume:
+</para>
+ <programlisting># gluster volume quota test-volume list
+
+<emphasis role="underline">
+ <emphasis role="underline"><emphasis role="underline">Path</emphasis>__________Limit______Set Size</emphasis>
+ </emphasis>
+/Test/data 10 GB 6 GB
+/Test/data1 10 GB 4 GB</programlisting>
+ </listitem>
+ <listitem>
+ <para>Display disk limit information on a particular directory on which limit is set, using the following
+command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> list <replaceable>/directory name</replaceable></command>
+</para>
+ <para>For example, to see the set limit on /data directory of test-volume:</para>
+ <programlisting># gluster volume quota test-volume list /data
+
+<emphasis role="underline"><emphasis role="underline">Path</emphasis>__________Limit______Set Size</emphasis>
+/Test/data 10 GB 6 GB</programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="chap-Administration_Guide-Dir_Quota-Update">
+ <title> Updating Memory Cache Size </title>
+ <para>For performance reasons, quota caches the directory sizes on client. You can set timeout indicating
+the maximum valid duration of directory sizes in cache, from the time they are populated.
+</para>
+ <para>For example: If there are multiple clients writing to a single directory, there are chances that some
+other client might write till the quota limit is exceeded. However, this new file-size may not get
+reflected in the client till size entry in cache has become stale because of timeout. If writes happen
+on this client during this duration, they are allowed even though they would lead to exceeding of
+quota-limits, since size in cache is not in sync with the actual size. When timeout happens, the size
+in cache is updated from servers and will be in sync and no further writes will be allowed. A timeout
+of zero will force fetching of directory sizes from server for every operation that modifies file data
+and will effectively disables directory size caching on client side.
+</para>
+ <para><emphasis role="bold">To update the memory cache size</emphasis>
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Update the memory cache size using the following command:
+</para>
+ <para><command># gluster volume set <replaceable>VOLNAME</replaceable> features.quota-timeout<replaceable> value</replaceable></command></para>
+ <para>For example, to update the memory cache size for every 5 seconds on test-volume:
+</para>
+ <programlisting># gluster volume set test-volume features.quota-timeout 5
+Set volume successful</programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="chap-Administration_Guide-Dir_Quota-Remove">
+ <title>Removing Disk Limit </title>
+ <para>You can remove set disk limit, if you do not want quota anymore.
+</para>
+ <para><emphasis role="bold">To remove disk limit </emphasis></para>
+ <itemizedlist>
+ <listitem>
+ <para>Remove disk limit set on a particular directory using the following command:
+</para>
+ <para><command># gluster volume quota <replaceable>VOLNAME</replaceable> remove <replaceable>/directory name</replaceable></command>
+</para>
+ <para>For example, to remove the disk limit on /data directory of test-volume:
+</para>
+ <programlisting># gluster volume quota test-volume remove /data
+Usage limit set on /data is removed</programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+</chapter>