sidebar_position | sidebar_label |
---|---|
4 |
Linux Quotas |
The following instructions are provided for your convenience. We are not responsible for errors caused by these instructions and we do not provide support for configuring quotas. For detailed instructions read the reference manual for your distro.
Run the following command to install the quota package.
yum install quota
Enable quotas on the partitions in /etc/fstab
. Partitions that do not have quotas enabled 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,usrquota 1 1
/dev/hda2 /usr ext2 defaults,usrquota 1 1
Edit /etc/rc.local and add the following command.
quotaon -a
Edit /etc/crontab
and add the following command.
0 3 * * 0 quotaoff -a;/sbin/quotacheck -aum;quotaon -a;
Restart your server to activate quotas. After restarting execute the following commands.
quotaoff -a
quotacheck -caum
quotaon -a
Run the following command to install the quota package.
apt-get install quota
Enable quotas on the partitions in /etc/fstab. Partitions that do not have quotas enabled 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,usrquota 1 1
/dev/hda2 /usr ext2 defaults,usrquota 1 1
Restart your server to activate quotas. After restarting execute the following commands.
quotaoff -a
quotacheck -caum
quotaon -a