How to “user quota”
This mini how to should guide you how to enable your user “quota” in noguix linux.
REQUIREMENT:
Install quota-3.12.mo
1) Create new user for “admin”
$~: useradd -g users -s /bin/bash -d /mnt/hdb1/home/admin -m admin
2) edit /etc/fstab
/dev/hdb1 /mnt/hdb1 ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
Add “usrquota” to the column no.4 as below:
/dev/hdb1 /mnt/hdb1 ext3 auto,users,suid,dev,exec,usrquota 0 0 # AutoUpdate
3) edit /etc/rc.d/rc.M
Make sure you uncomment quota enable in command in your rc.M file
4) reboot your system
5) Set user quota
$~:edquota -F vfsv0 admin
configure block / inode & try use soft limit let say 2MB=2048. Save then exit(F10)
6) Check, scan, create & repair user aquota.user file
$~:quotacheck -vm /dev/hdb1
7) Display user quota
$quota -F vfsv0 -uvsil admin
root@noguix~:repquota -a
*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
———————————————————————-
root — 131728 0 0 5 0 0
admin +- 128 2048 0 5 5 5
8) Tets user quota
Previously, we set admin quota soft limit for 2MB. Simply copy & paste any file larger than 2MB to the admin home folder.
root@noguix~:repquota -a
*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
———————————————————————-
root — 131728 0 0 5 0 0
admin +- 7396 2048 0 6days 5 5 5
P/S :
-notice the “+” sign above?. This show that admin already exceeded quota soft limit.
-use webmin if this how to really can’t help you much.
