PDA

View Full Version : quota for disk quotas, can only limit the total capacity?



andyleigood
16-Aug-2013, 03:37
quota for disk quotas, can only limit the total capacity without restricting individual partitions user capacity?
I have a large partition, I want to restrict disk usage, to prevent the disk is full, but do not want to limit the capacity of a single user, the use of ‘quota’ can do it?

ab
16-Aug-2013, 04:07
The limit of the filesystem/partition will do a good job of preventing any
use of the partition/filesystem beyond that limit. In other words, you
could set your filesystem to only have the smaller amount of space. You
may also be able to use group quotas, and then make all users a member of
a group, but I haven't tried that so who knows.

Before you do this, though, why do you want to do this? To programs
trying to use space the quota preventing use or the filesystem running out
space will all appear the same, except that most programs won't warn about
a lack of space or give as helpful an error when quotas prevent use
compared to when the filesystem is out of space, so either way the user
will just find out that the file they just created cannot be written and
they are out of luck. User quotas are usually used to ensure users use a
fair share, and then filesystem sizes are present because there is just a
limit on how big things can be.

Good luck.

andyleigood
16-Aug-2013, 07:05
Thank you.
Users want to avoid partition space is full, resulting in adverse consequences, but that disk quotas for users or doing too much trouble, if only the partition or disk quota exceeds the set value when given a warning on the line.

jmozdzen
16-Aug-2013, 10:10
Hi andyleigood,


Thank you.
Users want to avoid partition space is full, resulting in adverse consequences, but that disk quotas for users or doing too much trouble, if only the partition or disk quota exceeds the set value when given a warning on the line.

where do you see the difference between "partition is full" versus "quota applied to all users is exceeded"? As ab pointed out, to applications and those users the effect is the same.

If you want free space left so some privileged user (i.e. "root") can still act on the partition, then (for file systems of type ext2, ext3, ext4) you could configure reserved disk space via "tune2fs -m" or "tune2fs -r". Other file system types may have similar options.

Regards,
Jens

andyleigood
17-Aug-2013, 02:24
That's a good idea.
Thank you,I'll try it.