Disk Limits and Quota: Difference between revisions

From Linix VServer
Jump to navigationJump to search
(Restored content from Wayback Machine)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Introduction ==
<div id="content">
We call ''Disk Limit'' a disk space limit in a filesystem for one context (i.e. VServer). If you are interested in using user/group quotas inside a VServer, this is not the right place, look at the [[Quotas]] page.


Of course, you can also use a dedicated partition (or logical volume) for each guest, which is another way to limit disk space usage per guest.
<span id="top"></span>
<span id="disk-limits-and-quota"></span>
= Disk Limits and Quota =


== Activating disk limits ==
<div id="bodyContent">


For VServer version 2.0, please read http://oldwiki.linux-vserver.org/Disk+Limits
<span id="siteSub"></span>
=== From Linux-VServer ===


For VServer 2.2+, the procedure is nearly the same, only the mount option has changed:
<div id="contentSub">


# Activate the XID tagging on the filesystem hosting the VServer, using the ''tag'' mount option. You cannot use the ''remount'' option to add the tag on an already mounted filesystem. '''Be warn''', it is not advised to use it on the root filesystem! In the next example, we use the <tt>/dev/sdb1</tt> partition to host all the guests, under the <tt>/vservers</tt> directory <pre>mount -o tag /dev/sdb1 /vservers</pre>
# Consider modifying your <tt>/etc/fstab</tt> file if necessary, to make the mount option persist across reboots
# Tag the files belonging to the VServer with its XID <pre>chxid -URx -c vs_name /vservers/vs_name </pre>
# Write the limits under the <tt>/etc/vservers/vs_name/dlimits</tt> directory :
## Create this directory if necesary
## Create one sub-directory for each filesystem (in most cases, you should have only one), using any identifier (for example <tt>root</tt>)
## Under <tt>/etc/vservers/vs_name/dlimits/root/</tt> create the following files :
### <tt>directory</tt> : contains the directory to which the limit should be applied
### <tt>inodes_total</tt> : the amount of inodes this vserver should be limited to
### <tt>reserved</tt> : how much space (percentage-wise) should be reserved for the root user
### <tt>space_total</tt> : the amount of space this vserver should be limited to (measured in blocks of 1024 bytes)




</div>
<div id="jump-to-nav">


== More information ==
Jump to: [[#column-one|navigation]], [[#searchInput|search]]
* See also ''dlimits'' on the util-vserver homepage http://www.nongnu.org/util-vserver/doc/conf/configuration.html
 
* For information about limiting diskspace with XFS, please see the [[XFS]] page.
</div>
See dlimits on the util-vserver homepage http://www.nongnu.org/util-vserver/doc/conf/configuration.html or the copy below
 
# /etc/vservers/vserver-name/dlimits
 
<pre>  * /etc/vservers/vserver-name/dlimits/dlimit
        o directory
          The directory to which the limit should be applied
        o inodes_total
          The amount of inodes this vserver should be limited to
        o reserved
          How much space (percentage-wise) should be reserved for the root user
        o space_total
          The amount of space this vserver should be limited to (measured in blocks of 1024 bytes)</pre>
<br />
 
 
For information about limiting diskspace with XFS, please see the [[XFS|XFS]] page.
 
<div class="printfooter">
 
Retrieved from &quot;http://wiki.linux-vserver.org/Disk_Limits_and_Quota&quot;
 
</div>
<div class="visualClear">
 
 
 
</div>
 
</div>
 
</div>

Latest revision as of 00:42, 11 November 2025

Disk Limits and Quota[edit]

From Linux-VServer[edit]


Jump to: navigation, search

See dlimits on the util-vserver homepage http://www.nongnu.org/util-vserver/doc/conf/configuration.html or the copy below

  1. /etc/vservers/vserver-name/dlimits
   * /etc/vservers/vserver-name/dlimits/dlimit
         o directory
           The directory to which the limit should be applied
         o inodes_total
           The amount of inodes this vserver should be limited to
         o reserved
           How much space (percentage-wise) should be reserved for the root user
         o space_total
           The amount of space this vserver should be limited to (measured in blocks of 1024 bytes)



For information about limiting diskspace with XFS, please see the XFS page.