Enable user quotas on B3
Posted: 09 Nov 2010, 10:58
NOTE: The kernel and modules used here are not fully tested so use at your own risk!
This small guide will help you get user quotas running on your B3.
This is the steps I took on B3 to get user quotas working. It might be missing some small thing as it took a lot of testing to get it. Feel free to comment on steps missing or clarifications needed.
1. Download files from - http://b3.update.excito.org/test/ .I used wget to download the kernel and module files.
2. Install the packages manually -
3. Restart
4. Add quota support to mounted partition (I'm using journaled quota v2)
Open fstab and add ,usrjquota=aquota.user,jqfmt=vfsv0 to /home partition
The line should look like this
5. Remount the partition (restart will do it also)
6. Check with "mount" if the partiton was mounted correctly. In my example -
7. Add quota support to kernel modules
8. Restart
9. Check "lsmod" and find -
If you find it then the module loading was successful.
10. Create aquota files
I'm using 644 instead of 600 because users can see their usage thatway.
11. Install quota (might be installed already but just to be sure)
12. Run quotacheck
You should get something like this
Wait for the scan to complete.
13. Turn the qouta on
14. Use repquota (repquota -a for example) to check the current usage.
15. Now your done - quotas are working. Next step is to configure the usage limits.
16. You can use quotatool to set user quota limits. The example will set limit for user marten, using 15Mb for soft and 20Mb for hard limit on /home partition.
This should cover it
If you have any questions or comments please leave them here and I'll be happy to help.
Marten
This small guide will help you get user quotas running on your B3.
This is the steps I took on B3 to get user quotas working. It might be missing some small thing as it took a lot of testing to get it. Feel free to comment on steps missing or clarifications needed.
1. Download files from - http://b3.update.excito.org/test/ .I used wget to download the kernel and module files.
Code: Select all
wget filename
Code: Select all
dpkg -i bubba3-kernel_2.6.35.8-1.armel.deb bubba3-modules_2.6.35.8-1.armel.deb
4. Add quota support to mounted partition (I'm using journaled quota v2)
Open fstab and add ,usrjquota=aquota.user,jqfmt=vfsv0 to /home partition
Code: Select all
vi /etc/fstab
Code: Select all
..
/dev/mapper/bubba-storage /home ext3 defaults,usrjquota=aquota.user,jqfmt=vfsv0 0 2
..
Code: Select all
mount -o remount /home
Code: Select all
..
/dev/mapper/bubba-storage on /home type ext3 (rw,usrjquota=aquota.user,jqfmt=vfsv0)
..
Code: Select all
modprobe quota_v2
echo 'quota_v2' >> /etc/modules
9. Check "lsmod" and find -
Code: Select all
..
quota_v2 3461 0
..
10. Create aquota files
Code: Select all
touch /home/aquota.user
chmod 644 /home/aquota.user
11. Install quota (might be installed already but just to be sure)
Code: Select all
apt-get install quota quotatool
Code: Select all
quotacheck -vcum /home
Code: Select all
quotacheck: Scanning /dev/mapper/bubba-storage [/home] done
quotacheck: Old group file not found. Usage will not be substracted.
quotacheck: Checked 19 directories and 16 files
13. Turn the qouta on
Code: Select all
quotaon /home
15. Now your done - quotas are working. Next step is to configure the usage limits.
16. You can use quotatool to set user quota limits. The example will set limit for user marten, using 15Mb for soft and 20Mb for hard limit on /home partition.
Code: Select all
quotatool -u marten -bq 15M -l "20 Mb" /home
If you have any questions or comments please leave them here and I'll be happy to help.
Marten