[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quotas & AMD



felix@ime.usp.br said:

>   Does anybody know how I can configure my network in order to let the
> users know their disk quotas? The problem is that the quota command
> doesn't show the quota values, it only shows them when the user is logged
> on the server.

You need to run the rquotad on the server to be able to query quotas for NFS-mounted filesystems. I patched /etc/init.d/quota to run rpc.rquotad if you export filesystems and at the same time some filesystems have quotas. I don't check, though, that set of exported filesystems and the set of filesystems with quotas have a non-empty intersection.

			Cheers,
				Lukas
-------------------------------------------------------------------------------
   Dr. Lukas Nellen                 | Email: lukas@teorica0.ifisicacu.unam.mx
   Depto. de Fisica Teorica, IFUNAM |
   Apdo. Postal 20-364              | Tel.:  +52 5 622 5166
   01000 Mexico D.F., MEXICO        | Fax:   +52 5 622 5015

#! /bin/sh
#
# Patched by Lukas Nellen <lukas@ft.ifisicacu.unam.mx> to check if it might
# be a good idea to run `rquotad'.
# The regular expression for grepping /etc/exports to check if we are an
# NFS-server is shamelessly stolen from netstd_nfs.

RQUOTAD=/usr/sbin/rpc.rquotad

case "$1" in
  start)
     # Check quotas.
     if [ -x /usr/sbin/quotacheck ]
     then
        echo -n 'Checking quotas: ';
	/usr/sbin/quotacheck -a -ug
        echo 'Done'

     fi 
     # Turn quotas on.
     if [ -x /usr/sbin/quotaon ]
     then
        echo 'Turning on quotas';
        /usr/sbin/quotaon -aug
     fi
     # Start rpc.rquotad
     if [ -x $RQUOTAD ] \
	&& grep -q '^[^#]*quota' /etc/fstab \
	&& grep -q '^/' /etc/exports
     then
	echo 'Starting rquotad.'
	start-stop-daemon --start --quiet --exec $RQUOTAD
     fi
    ;;
  stop)
     if [ -x /usr/sbin/quotaoff ]
     then
	echo "Turning off quotas"
	/usr/sbin/quotaoff -a
     fi
     start-stop-daemon --stop --quiet --oknodo --exec $RQUOTAD     
    ;;
  *)
    echo "Usage: /etc/init.d/quota {start|stop}"
    exit 1
esac

exit 0

Reply to: