Add a section about using the ZFS reservation feature.
This work was done as part of Google Code-In (GCIN) 2011. GCIN student: Isabell Long (isabell121 gmail com) GCIN task mentor: theraven, pgj Patch reapplied by: Niclas Zeising (zeising daemonic se) Minor cleanups by: me
This commit is contained in:
parent
f1485856ea
commit
5e41f5f784
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=38349
1 changed files with 56 additions and 0 deletions
|
@ -688,6 +688,62 @@ errors: No known data errors</screen>
|
|||
|
||||
<screen>&prompt.root; <userinput>zfs get quota storage/home/bob</userinput></screen>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>ZFS Reservations</title>
|
||||
|
||||
<para>ZFS supports two types of space reservations. This
|
||||
section will explain the basics of each one, and include
|
||||
some usage instructions.</para>
|
||||
|
||||
<para>The <literal>reservation</literal> property makes it
|
||||
possible to reserve a minimum amount of space guaranteed for a
|
||||
dataset and its descendants. This means that if a 10 GB
|
||||
reservation is set on <filename>storage/home/bob</filename>,
|
||||
if disk space gets low, at least 10 GB of space is
|
||||
reserved for this dataset. The
|
||||
<literal>refreservation</literal> property sets or indicates
|
||||
the minimum amount of space guaranteed to a dataset excluding
|
||||
descendants, such as snapshots. As an example, if a snapshot
|
||||
was taken of <filename>storage/home/bob</filename>, enough
|
||||
disk space would have to exist outside of the
|
||||
<literal>refreservation</literal> amount for the operation to
|
||||
succeed because descendants of the main data set are not
|
||||
counted by the <literal>refreservation</literal> amount and
|
||||
so do not encroach on the space set.</para>
|
||||
|
||||
<para>Reservations of any sort are useful in many situations,
|
||||
for example planning and testing the suitability of disk space
|
||||
allocation in a new system, or ensuring that enough space is
|
||||
available on file systems for system recovery procedures and
|
||||
files.</para>
|
||||
|
||||
<para>The general format of the <literal>reservation</literal>
|
||||
property is
|
||||
<literal>reservation=<replaceable>size</replaceable></literal>,
|
||||
so to set a reservation of 10 GB on
|
||||
<filename>storage/home/bob</filename>the below command is
|
||||
used:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>zfs set reservation=10G storage/home/bob</userinput></screen>
|
||||
|
||||
<para>To make sure that no reservation is set, or to remove a
|
||||
reservation, instead use:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>zfs set reservation=none storage/home/bob</userinput></screen>
|
||||
|
||||
<para>The same principle can be applied to the
|
||||
<literal>refreservation</literal> property for setting a
|
||||
refreservation, with the general format
|
||||
<literal>refreservation=<replaceable>size</replaceable></literal>.</para>
|
||||
|
||||
<para>To check if any reservations or refreservations exist on
|
||||
<filename>storage/home/bob</filename>, execute one of the
|
||||
following commands:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>zfs get reservation storage/home/bob</userinput>
|
||||
&prompt.root; <userinput>zfs get refreservation storage/home/bob</userinput></screen>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue