Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
Quotas - installation and configuration --- by James23 July 2000
Decide what partitions you want to enable quota checking on and modify /etc/fstab
accordingly. For each partition for which you want quotas enabled, modify that line
in the file. userquota is for individual user quotas whereas. groupquota
is for entire group quotas (i.e. the restrictions apply to groups as a whole).
/dev/ad0s1f /home ufs rw,userquota,groupquota 2 2
Start out by typing:
This will create all the needed database files for the next command to work
The following command will enable quotas for all quota-flagged partitions listed in /etc/fstab:
You can also issue this command to enable quotas only for the partition /mount_point
(replace /mount_point with the partition applicable to your needs):
quotaoff has the same syntax as quotaon, but as the name implies,
it's used to turn off quota.
To edit user quotas, issue the following command:
edquota -u username
This excerpt from the edquota man page should help with editing quotas:
Users are permitted to exceed their soft limits for a grace period that may be
specified per filesystem. Once the grace period has expired, the soft limit is enforced as
a hard limit. The default grace period for a filesystem is specified in
/usr/include/ufs/ufs/quota.h. The -t flag can be used to change the grace period.
After you're done editing the quota file, save your changes and exit the editor.
Repeat this step for each user that you want to have a quota. If you have a bunch
of users that will use the same quota settings, type something like the following:
edquota -u -p user1 user2 user3 user4
This will copy the quota settings from user1 to user2, user3, and user4. Specify as
many users as you need to copy the quotas.
You can edit the quotas for a group by typing:
edquota -g groupname
Starting quotas at boot time
To ensure quotas are enforced after a reboot, add the following line to /etc/rc.conf:
Checking the usage
There will come a time that you will want to check your quota usage. Simply type the
following command to check your quota:
Or, if you're root, you can check quotas of other users by typing: