DISK QUOTAS ON POP ================== Philosophy ---------- Each user has a limit for disk use on /home1 (thier home directory). At leasy initially all quotas will be the same (400MB). There are no quotas for /tmp. Users sharing the CPUs on one node must fight over /tmp themselves. Users with large storage requirements should make that known (>600MB on /tmp). Red Hat distribution -------------------- It seems that quotas are turned on in the default RedHat5.0 kernel. Files ----- /sbin/quotaon /sbin/quotaoff /sbin/quotacheck /usr/sbin/edquota /usr/sbin/repquota /usr/sbin/quotastats /usr/bin/quota To get a report of the quota usage and settings for /home1 or simeon /sbin/repquota /home1 /sbin/repquota -u simeon If messing about as root then you need to do a quotacheck before looking at peoples quotas: /sbin/quotacheck /home1; /sbin/repquota /home1 To edit one user's quota (simeon) /usr/sbin/edquota -u simeon To copy one user's quota (simeon --> smc) /usr/sbin/edquota -p simeon smc System configuration -------------------- Quota starting etc. is in the standard /etc/rc.d/rc.sysinit To set up a replacement script for /usr/bin/quota (moved to /usr/bin/quota.local on all but pop01). Not that we must have the real executable as /usr/bin/quota on pop01 else the little rsh script will loop forever! [root@pop01]# ls -la /usr/bin/quota -r-xr-xr-x 1 root root 10908 Oct 20 1997 /usr/bin/quota [root@pop01]# cp /usr/bin/quota /usr/bin/quota.local [root@pop01]# pop.copy /usr/bin/quota.local Copying /usr/bin/quota.local to /usr/bin/quota.local on... pop02 pop03 pop04 pop05 pop06 pop07 pop08 pop09 pop10 pop11 pop12 pop13 pop14 ..done. [root@pop01]# cat - > /usr/bin/quota.pop01 #!/bin/sh rsh pop01 "quota $1 $2 $3 $4" [root@pop01]# chmod a+rx,a-w /usr/bin/quota.pop01 [root@pop01]# pop.copy /usr/bin/quota.pop01 Copying /usr/bin/quota.pop01 to /usr/bin/quota.pop01 on... pop02 pop03 pop04 pop05 pop06 pop07 pop08 pop09 pop10 pop11 pop12 pop13 pop14 ..done. [root@pop01]# cat - > /usr/bin/quota #!/bin/sh echo "[local]" /usr/bin/quota.local echo "[pop01]" /usr/bin/quota.pop01 [root@pop01]# chmod a+rx,a-w /usr/bin/quota [root@pop01]# pop.copy /usr/bin/quota Copying /usr/bin/quota to /usr/bin/quota on... pop02 pop03 pop04 pop05 pop06 pop07 pop08 pop09 pop10 pop11 pop12 pop13 pop14 ..done. [root@pop01]# cp /usr/bin/quota.local /usr/bin/quota cp: overwrite `/usr/bin/quota'? y User interface and messages --------------------------- To see quota, just type `quota' which should find /usr/bin/quota. On pop01 this file is the normal quota. On the other nodes it is a script that runs quota locally (renamed /usr/bin/quota.local) and then quota on pop01. Error messages when quota exceeded: From pop01 something like /home1: write failed, user disk limit reached. cp: x: Disc quota exceeded From other nodes something like NFS input/output error [Simeon Warner - 10Jul98] Updated to use ssh ------------------ Just changed /usr/bin/quota.pop01 to use ssh not rsh on all machines. File is now: #!/bin/sh ssh pop01 "quota $1 $2 $3 $4" [Simeon Warner - 25Aug98] -------------------------------------------------------------------------------