WARNING!!! As this site contains some arts' photos such as Michelangelo's David statue which were classed as Indecent Articles by the Government of Hong Kong Special Administrative Region, people who under 18 are not allowed to enter this site.
警告!!!由於本站含有香港特別行政區政府評級為不雅物品之藝術品照片(如米開羅之大衛像),未滿18歲之人士,不得進入本站。

22 May, 2007

Enable Quota on FreeBSD 6.2

Filed under: Computer — wanleung @ 11:20 am

Need to recompile kernel.

cd /usr/src/sys/i386/conf

cp GENERIC MYKERNEL

Edit the file MYKERNEL and add the line

options QUOTA

Then run the following commands:

/usr/sbin/config MYKERNEL

cd ../compile/MYKERNEL

make depend

make

make install

——

To Enable Quota

Edit the file /etc/fstab and look for the entry, in which the directory /home is mentioned, e.g.

/dev/ad0s1d /home ufs rw 2 2

Add the words userquota and groupquota as follows:

/dev/ad0s1d /home ufs rw,userquota,groupquota 2 2

To enable quota at boot time you have to add the following lines to /etc/rc.conf:

quota_enable=”YES”

check_quotas=”YES”

Reboot the system:

shutdown -r now

After the reboot run the following commands:

quotacheck -a

quotaon -a

Install the setquota-Tool at last:

pkg_add -r setquota