Applying Quota on Users & Groups
1. Create a partition on the hard disk
Steps to create a partition:
- fdisk /dev/hda (Device ID may be anything like sda, sdb, etc)
- n (for new partition)
- Enter the partition Number
- t (for the type of partition)
- Enter the type of partition Number
- w (write)
- partprobe (To update the kernel)
- mkdir /quota ( Create folder on OS to mount the partition)
- mkfs.ext3 /dev/hda(x)
- mount /dev/had(x) /quota
- chmod 755 /quota
2. For user quota only, edit the /etc/fstab file like /dev/hda(x) /quota ext3 defaults,usrquota 0 0
3. For user & group quota both, edit /etc/fstab file like /dev/hda(x) /quota ext3 defaults,usrquota,grpquota 0 0
4. Remount /quota partition, mount -o remount /quota
5. Enable quota for user quota only quotacheck -c /quota
6. For user & group quota both, quotacheck -cug /quota
7. To confirm quota is enabled, cd /quota (check the file aquota.user)
8. To implement user limitations, edquota -u username
9. To enable group limitations, edquota -g groupname
10. Apply soft & hard limits in KB or on no. of files or Volume based quota.
11. Give the command quotaon /quota to enable the limitations of quota.
Leave a Reply