Quota

File system quotas refer to how much disk space a given user is allowed to have on a given partition. Quotas are established using the  command. The purpose of quotas is to keep the users from taking up more disk space than they should properly have - for example, on a large multi-user system.

= QuickStart = yast -i quota /dev/sda  /   ext4   acl,usrquota,user_xattr        1 1 and then reboot.
 * To set a quota you may have to - depending on your distribution - install the quota package first. To do this e.g. under SUSE Linux open a console and issue
 * Now you will need to make sure the partition you want to set a quota on is mounted with quotas enabled. For example if you want to set a quota onto the / partition you must remount this with the option usrquota or grpquota. To achieve this you could add usrquota to your /etc/fstab like this:
 * initialize the quota:
 * 1) quotacheck -F vfsold -m -c /

edquota john
 * set a quota for a user named john:

You will get to a new screen where you can set the quota for that user. It will look like this:

Disk quotas for user john (uid 1000): Filesystem                  blocks       soft       hard     inodes     soft     hard /dev/sda1                   104888          0          0       1117        1        1 ~                                                                                              ~ Note that above we have set a quota of 1 for soft inode limit and hard inode limit.

To activate the quota use quotaon

$ touch test $ touch test2 sda1: write failed, user file limit reached. touch: cannot touch ‘test2’: Disk quota exceeded
 * now test it out:
 * 1) su - john

= TroubleShooting =

Has no quota enabled
quotaon: Mountpoint (or device) / not found or has no quota enabled.
 * 1) quotaon /

Cannot find //aquota.user
quotaon: cannot find //aquota.user on /dev/sda1 [/]
 * 1) quotaon /

= See also =
 * edquota's man page
 * Implement and Manage Disk Quotas