mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
e774aa47f7
commit
97d3bbd76e
|
@ -266,7 +266,7 @@ Quota</ULink>, <CiteTitle>
|
|||
Quota mini-HOWTO</CiteTitle>
|
||||
</Para><Para>
|
||||
<CiteTitle>
|
||||
Updated: April 2002</CiteTitle>.
|
||||
Updated: August 2003</CiteTitle>.
|
||||
How to enable file system quota on a Linux host, assigning
|
||||
quota for users and groups, as well as the usage of miscellaneous
|
||||
quota commands. </Para>
|
||||
|
|
|
@ -3699,7 +3699,7 @@ on an Intel Linux system. </Para>
|
|||
Quota</ULink>,
|
||||
<CiteTitle>Quota mini-HOWTO</CiteTitle>
|
||||
</Para><Para>
|
||||
<CiteTitle>Updated: April 2002</CiteTitle>.
|
||||
<CiteTitle>Updated: August 2003</CiteTitle>.
|
||||
How to enable file system quota on a Linux host, assigning
|
||||
quota for users and groups, as well as the usage of miscellaneous
|
||||
quota commands. </Para>
|
||||
|
|
|
@ -3,15 +3,17 @@
|
|||
<article>
|
||||
|
||||
<title>Quota mini-HOWTO
|
||||
|
||||
<author>Ralf van Dooren <tt/r.vdooren@snow.nl/
|
||||
<date>v0.3, April 2002
|
||||
<abstract>Preamble: This document is written by Ralf van Dooren (r.vdooren@snow.nl).
|
||||
|
||||
<date>v0.5, 2003-08-09
|
||||
<abstract>
|
||||
Preamble: This document is written by Ralf van Dooren (r.vdooren@snow.nl).
|
||||
Original text and setup of this document is copyleft-ed by Albert M.C. Tam, many thanks to him
|
||||
for this initial mini-HOWTO.
|
||||
|
||||
This document is licensed under the GNU Free Documentation License.
|
||||
<p>
|
||||
Permission to use, copy, distribute this document for non-commercial purposes
|
||||
|
||||
Permission to use, copy, distribute this document for non-commercial purposes
|
||||
is hereby granted, provided that the author's / editor's name and this notice
|
||||
appear in all copies and/or supporting documents; that this document is not
|
||||
modified. This document is distributed in hope that it will be useful, but
|
||||
|
@ -23,12 +25,16 @@
|
|||
This document describes how to enable file system quota on a Linux host,
|
||||
assigning quota for users and groups, as well as the usage of miscellaneous
|
||||
quota commands. It is intended for users running kernel 2.x (recently tested
|
||||
on kernel 2.4.17).
|
||||
on kernel 2.4.21).
|
||||
<p>
|
||||
Feel free to send feedbacks or comments to r.vdooren@snow.nl if you find an
|
||||
error, or if any information is missing. I appreciate it.
|
||||
</abstract>
|
||||
<sect>What is Quota?
|
||||
|
||||
<sect>What is quota?
|
||||
|
||||
<sect1>What is quota for?
|
||||
|
||||
<p>
|
||||
Quota allows you to specify limits on two aspects of disk storage: the
|
||||
number of inodes a user or a group of users may possess; and the number of
|
||||
|
@ -38,8 +44,11 @@ Quota allows you to specify limits on two aspects of disk storage: the
|
|||
consumption limit, taking away their ability to consume unlimited disk space
|
||||
on a system. Quota is handled on a per user, per file system basis. If there
|
||||
is more than one file system which a user is expected to create files, then
|
||||
quota must be set for each file system separately.
|
||||
<sect>Current Status of Quota on Linux
|
||||
quota must be set for each file system separately. Various tools are
|
||||
available for you to administer and automate quota policies on your
|
||||
system.
|
||||
|
||||
<sect1>Current Status of Quota on Linux
|
||||
<p>
|
||||
|
||||
Currently, there are some major changes in the way quota works. There are two
|
||||
|
@ -51,55 +60,73 @@ on your system, you may or may not have to install this patch and package. You c
|
|||
you have any questions about this. I'll try to include a overview of Linux distro's and it's implications
|
||||
in a later version of this document.
|
||||
|
||||
<sect>Requirements for Using Quota on Linux
|
||||
<sect>Requirements for quota
|
||||
<p>
|
||||
<sect1>Kernel
|
||||
<p>
|
||||
|
||||
The 2.x kernel source is available from
|
||||
<code>http://www.kernel.org
|
||||
</code>. Please use an available mirror close to your location to save bandwidth.
|
||||
The 2.x kernel source is available from <url
|
||||
url="http://www.kernel.org/" name="http://www.kernel.org">
|
||||
Please use an available mirror close to your location to save bandwidth. If
|
||||
you have a recent version of tar, you can download the .bz2 compressed file.
|
||||
|
||||
Untar the kernel:
|
||||
<code>
|
||||
cd /usr/src
|
||||
tar jxvf /path/to/linux-2.4.21-tar.bz2 - for bzip2 kernel -
|
||||
tar zxvf /path/to/linux-2.4.21-tar.gz - for gzip kernel -
|
||||
ln -s /usr/src/linux-2.4.21 /usr/src/linux
|
||||
</code>
|
||||
|
||||
<sect1>Quota software
|
||||
<p>
|
||||
|
||||
Depending on the Linux distribution you have, you may, or may not have
|
||||
the quota softwares installed on your system. The most recent version of quota
|
||||
is available through SourceForge and is in active development. You can reach the
|
||||
homepage of the quota-development at
|
||||
homepage of the quota-development at <url
|
||||
url="http://www.sourceforge.net/project/linuxquota"
|
||||
name="http://www.sourceforge.net/projects/linuxquota" >.
|
||||
|
||||
<sect>Quota setup: installation and configuration
|
||||
|
||||
<code>http://www.sourceforge.net/projects/linuxquota
|
||||
</code>
|
||||
<p>
|
||||
<sect>Quota Setup on Linux - Part I: The Configuration
|
||||
<p>
|
||||
<sect1>Patch the kernel
|
||||
|
||||
<p>Download the patch for your kernel at:
|
||||
|
||||
<code>
|
||||
ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/
|
||||
</code>
|
||||
<url url="ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/"
|
||||
name="ftp::/atrey.karlin.mff.cuni.cz/pub/local/jack/quota/" >.
|
||||
|
||||
<p>
|
||||
Choose your kernel version and download the patch. Patch your kernel with the 'patch' command.
|
||||
Choose your kernel version and download the patch(es). Patch your kernel with the 'patch' command. If there is more than 1 patch for your kernel version, be sure to apply the patches in the correct order.
|
||||
|
||||
You can use this script ( I assume the downloaded patches are in /tmp/quota/ and the kernel has been untarred to /usr/src/linux) :
|
||||
|
||||
<code>
|
||||
#!/bin/sh
|
||||
|
||||
gunzip /tmp/quota/*.gz
|
||||
cd /usr/src/linux
|
||||
COUNT=`ls -1 /tmp/quota/*.diff | wc -l`
|
||||
for I in `seq 1 $COUNT`
|
||||
do
|
||||
patch -p1 < /tmp/quota/quota-2.4.21-$I-*.diff
|
||||
done
|
||||
</code>
|
||||
|
||||
<sect1>Reconfigure your kernel
|
||||
<p>
|
||||
|
||||
Reconfigure your kernel and add quota support by typing y to:
|
||||
<code>Quota support (CONFIG_QUOTA) [n] y
|
||||
</code>
|
||||
Reconfigure your kernel and add quota support.
|
||||
|
||||
<p>Via `make menuconfig` of `make xconfig` you can find the option to support quota
|
||||
under the Filesystems-menu.
|
||||
<p>Via `make menuconfig` or `make xconfig` you can find the option to support quota under the Filesystems-menu. You can specify extra options if you need them, like 32-bit UID support.
|
||||
|
||||
Make sure the new kernel will be used when rebooting the system.
|
||||
<p>Save the configuration and compile the kernel. Make sure the new kernel will be used when rebooting the system.
|
||||
|
||||
<sect1>Compile and install the quota softwares
|
||||
<p>
|
||||
If the quota package is already in your Linux distribution, you don't have to install the quota
|
||||
software. If the quota package is not available in your Linux distribution, or if you wan't to
|
||||
install the most recent version, you can download the latest version of the quota software source from
|
||||
the location mentioned above.
|
||||
To be able to use all the features of the new quota system, you'll probably need to download the new quota-package. Download the new quota software via the URL
|
||||
provided above.
|
||||
<p>
|
||||
When downloaded do:
|
||||
<code>$ gzip -dc <downloaded file> | tar xvf
|
||||
|
@ -167,14 +194,14 @@ to take effect. The new kernel with quota support will be loaded and the startup
|
|||
just created will be executed. At first run, quotacheck will generate the appropiate files to maintain
|
||||
the quota databases.
|
||||
|
||||
<sec1>Add quotacheck to crontab
|
||||
<sect1>Add quotacheck to crontab
|
||||
|
||||
<p>
|
||||
Although quota should work with periodical checks, it sometimes helps to run quotacheck periodically, e.g. weekly. Add the following line to your root's crontab:
|
||||
<code>0 3 * * 0 /sbin/quotacheck -avug
|
||||
</code>
|
||||
|
||||
<sect>Quota Setup on Linux - Part II: Assigning Quota for Users and Groups
|
||||
<sect>Quota setup: tools
|
||||
<p>
|
||||
|
||||
This operation is performed with the edquota command (`man edquota` for details).
|
||||
|
|
Loading…
Reference in New Issue