cvs commit: hints quotas.txt

timothy at timothy at
Sun Dec 8 10:44:35 PST 2002

timothy     02/12/08 13:44:35

  Added:       .        quotas.txt
  Initial commit.
  Revision  Changes    Path
  1.1                  hints/quotas.txt
  Index: quotas.txt
  TITLE:		Quota Support
  LFS VERSION:	3.3 + (maybe all)
  AUTHOR:		Remco Jansen <remcorkz at>
  	This hint describes how to setup quota support on your LFS system.
  Wrote this hint because there's one little thing that you may come across trying
   to setup quota-tools. Normally on an LFS system the mtab file is created as a
  symlink to /proc/mounts. The quota-tools programs won't work with this
  First make sure quota support is built into your kernel. If not, recompile your 
  Also you need to get the quota-tools package from
  (at the time of this writing version is 3.08).
  Their homepage is can be found at
  Install the quota-tools package as normally.
  Edit the Makefile by hand to setup the directories so that they obey the LFS
  standard. (prefix=/bin, sysconfdir=/etc)
  make && make install
  Now the tools are installed properly, you have to change the /etc/mtab symlink
  to the more-used /etc/mtab file.
  for more information on this issue)
  rm -f /etc/mtab &&
  touch /etc/mtab &&
  chmod 644 /etc/mtab
  In order to let the mtab file be accurate (also when the system has crashed for 
  some reason) we add an mtab initialization part to the mountfs initscript.
  Add the following lines to the start)-section of the mountfs initscript, right 
  after the remounting of the root file system in read-write mode lines.
                  # Because we have replaced the /etc/mtab-symlink by a file
                  # we have to update the status of /etc/mtab.
                  # First remove it. Then add an entry for the already
                  # mounted root file system to it.
                  echo "Clearing /etc/mtab..."
                  : > /etc/mtab
                  echo "Update mtab file with root file system..."
                  mount -f -o remount /
                  echo "Update mtab file with proc file system..."
                  mount -f /proc
  Create the quota initscript as follows:
  # Begin $rc_base/init.d/quotas
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at
  source /etc/sysconfig/rc
  source $rc_functions
  case "$1" in
                  echo "Checking quotas on all filesystems..."
                  /usr/sbin/quotacheck -augM
                  echo "Turning quota administration on..."
                  /usr/sbin/quotaon -aug
                  echo "Turning off quota administration..."
                  /usr/sbin/quotaoff -aug
                  echo "Restarting quota administration not allowed."
                  echo "Usage: $0 {start|stop|reload|restart|status}"
                  exit 1
  # End $rc_base/init.d/quotas
  The last step is editing your /etc/fstab.
  For each filesystem on which you want to enable quota support add either
  usrquota or grpquota or the two of them to the options section of that file-
  system. (for this information you can also have a look at one of the thousands
  of quota how-to's)
  Reboot your system. (You may also update the mtab file by issueing the
  mount -f filesystem command for each already mounted filesystem, remount the 
  filesystems on which you're installing quota support and then start quota 
  administration by running quotaon -aug. However it is better to run the 
  quotacheck tool as well... So if possible: reboot.)
  The quotaon program will create the quota.user and/or files for each
  desired filesystem automatically.
  You're finished. Good luck.
Unsubscribe: send email to listar at
and put 'unsubscribe hints' in the subject header of the message

More information about the hints mailing list