5

Is the quota approach still in use to limit the usage of disk space and/or the concurrency between users.

Quota works with aquota.user files in the concerned directories AND some settings in /etc/fstab with options like usrquota

But some times, regarding with journalised filesystems, this options change for usrjquota=aquota.user,jqfmt=vfsv1 .

Is this abstract still correct? https://wiki.archlinux.org/index.php/Disk_quota

I'm very surprised to see both quota and jquota set of options. Are they backward compatible, deprecated, replaced???

Could another approach use cgroups to limit space access? It seems not: How to set per process disk quota?

Are there other methods nowadays?

0

Is the quota approach still in use?

Yes it is. Since disks have grown in size, quotas might not be of much worth to common users, but still find their usage in multi-user environment e.g. on servers. Android uses quotas on ext4 and f2fs to clear caches and and control per-app disk usage. In-kernel implementations as well as userspace tools are up-to-date.

Quota works with aquota.user files in the concerned directories AND some settings in /etc/fstab with options like usrquota.

Linux disk quota works on per-filesystem basis, so aquota.user (and aquota.group) files are created in the root of concerned filesystem. usrquota (or usrjquota=) mount option has to be passed when mounting filesystem. Or quota filessytem feature has to be enabled when formatting or later using tune2fs.

I'm very surprised to see both quota and jquota set of options

jquota is evolution of quota. From ext4(5): "Journaled quotas have the advantage that even after a crash no quota check is required." jqfmt= specifies quota database file format. See more details in Difference between journaled and plain quota.

Are they backward compatible, deprecated, replaced?

No they are two different sets of mount options, not deprecated or replaced. Mount options are different and not compatible, either one of the two can be used. Journaled quota is only supported by version 2 quota files (vfsv0 and vfsv1), which can also be hidden files (associated to reserved inodes 3 and 4 on ext4) if quota filesystem feature is enabled. Version 1 quota file format (vfsold) works with both. Also upgrading to journaled quota is not very complex, so backward compatibility doesn't matter much.

Could another approach use cgroups to limit space access?

No. Control groups limit resource usage (e.g. processor, RAM, disk I/O, network traffic) on per process basis while files are saved on filesystems with UID/GID information. When a process accesses a file for reading or writing, kernel enforces DAC to allow or deny access by comparing process UID/GID with filesystem UID/GID. So it's quite simple to enforce quota limits at the same time as the filesystem always maintains total space usage on per-UID basis (when quota is enabled).

Are there other methods nowadays?

No. Or at least not very commonly known.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.