IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Quota mini-HOWTO

Search Howtos :Match :
Next Previous Contents

3. Quota setup: installation and configuration

3.1 Patch the kernel

Download the patch for your kernel at:

ftp::/atrey.karlin.mff.cuni.cz/pub/local/jack/quota/.

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) :


#!/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

3.2 Reconfigure your kernel

Reconfigure your kernel and add quota support.

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.

Save the configuration and compile the kernel. Make sure the new kernel will be used when rebooting the system.

3.3 Compile and install the quota softwares

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.

When downloaded do:


$ gzip -dc <downloaded file> | tar xvf 
$ cd quota-tools  (or whatever directory the software is put in)
$ ./configure
$ make
$ su
# make install

3.4 Modify your system init script to check quota and turn quota on at boot time

Here's an example:


# Check quota and then turn quota on. 
if [ -x /usr/sbin/quotacheck ] 
        then 
               echo "Checking quotas. This may take some time." 
               /usr/sbin/quotacheck -avug 
               echo " Done." 
        fi 
         if [ -x /usr/sbin/quotaon ] 
        then 
                echo "Turning on quota." 
                /usr/sbin/quotaon -avug 
        fi

The golden rule is that always turn quota on after your file systems in /etc/fstab have been mounted, otherwise quota will fail to work. I recommend turning quota on right after the part where file systems are mounted in your system init script.

3.5 Modify /etc/fstab

Partitions that you have not yet enabled quota normally look something like:


/dev/hda1       /       ext2    defaults        1       1
/dev/hda2       /usr    ext2    defaults        1       1

To enable user quota support on a file system, add "usrquota" to the fourth field containing the word "defaults" (man fstab for details).


/dev/hda1       /       ext2    defaults        1       1
/dev/hda2       /usr    ext2    defaults,usrquota       1       1

Replace "usrquota" with "grpquota", should you need group quota support on a file system.


/dev/hda1       /       ext2    defaults        1       1
/dev/hda2       /usr    ext2    defaults,grpquota       1       1

Need both user quota and group quota support on a file system?


/dev/hda1       /       ext2    defaults        1       1
/dev/hda2       /usr    ext2    defaults,usrquota,grpquota       1   1

3.6 Activate the quota system

To activate the quota software you have to reboot the system for the changes you have made to take effect. The new kernel with quota support will be loaded and the startup scripts you've just created will be executed. At first run, quotacheck will generate the appropiate files to maintain the quota databases.

3.7 Add quotacheck to crontab

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:


0 3 * * 0 /sbin/quotacheck -avug


Next Previous Contents
Search Howtos :Match :
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
Mutt 1.5.19
Small but very powerful text-based mail client.
Galculator 1.3.2
GTK 2 based scientific calculator
GTK2 2.14.7
GUI Toolkit
WebGUI 7.5.38
A fully featured content management system.
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info