Sysadmin/Quota: Difference between revisions

No edit summary
No edit summary
Line 35: Line 35:


=== Show quota summary for all users ===
=== Show quota summary for all users ===
{{{
repquota -vast
repquota -vast
}}}


=== Create quota from scratch ===
=== Create quota from scratch ===
{{{
quotacheck -m -c /home
quotacheck -m -c /home
quotacheck -m -c /mail
quotacheck -m -c /mail
quotaon -au
quotaon -au
}}}


=== Reset quota limits for all users ===
=== Reset quota limits for all users ===
{{{
cd /home
cd /home
for i in *; do
for i in *; do
         # 25G  30G 1M 1.2M
         # 25G  30G 1M 1.2M
         setquota -u $i 26214400 31457280 1024000 1200000 /home
         setquota -u $i 26214400 31457280 1024000 1200000 /home
         #  1G 1.2G 1M 1.2M
         #  1G 1.2G 1M 1.2M
         setquota -u $i 10485760 12582912 1024000 1200000 /mail
         setquota -u $i 10485760 12582912 1024000 1200000 /mail
done
done
}}}


=== Check quota limits in cron.daily ===
=== Check quota limits in cron.daily ===
See `/etc/warnquota.conf` and `/etc/quotatab`
See `/etc/warnquota.conf` and `/etc/quotatab`
{{{
warnquota -u -s
warnquota -u -s
}}}


=== Crash recovery ===
=== Crash recovery ===