On any shared Linux server — file servers, web hosting, VPS platforms, or multi-tenant environments — uncontrolled disk usage by individual users or groups can exhaust storage, degrade performance for everyone, and cause service outages. Disk quotas solve this problem by enforcing per-user and per-group limits on disk space and file count.
This guide compares three self-hosted Linux disk quota management approaches: the quota tools (traditional CLI suite), quotatool (command-line quota editor), and Webmin (web-based system administration with quota module).
How Linux Disk Quotas Work
Linux disk quotas operate at the filesystem level, not the user level. The filesystem tracks block usage (disk space) and inode usage (file count) for each user and group, then enforces limits defined by the administrator.
Quota Types
| Type | Scope | Use Case |
|---|---|---|
| User quota | Per-user limits | Limit individual user storage |
| Group quota | Per-group limits | Limit department or team storage |
| Project quota | Per-project limits (XFS) | Limit storage per project directory |
| Directory quota | Per-directory limits (ZFS/Btrfs) | Limit storage per directory tree |
Soft vs Hard Limits
| Limit Type | Behavior |
|---|---|
| Soft limit | Warns user when exceeded; allows grace period before enforcement |
| Hard limit | Absolute ceiling — no writes permitted beyond this point |
| Grace period | Time allowed to reduce usage below soft limit (default: 7 days) |
When a user exceeds their soft limit, they receive warnings but can continue writing. Once the grace period expires (or the hard limit is reached), writes are blocked with EDQUOT errors.
Filesystem Support
| Filesystem | User Quota | Group Quota | Project Quota | Quota Format |
|---|---|---|---|---|
| ext4 | Yes | Yes | No | vfsv0/vfsv1 |
| XFS | Yes | Yes | Yes | XFS native |
| Btrfs | Yes (via qgroups) | Yes | No | Btrfs qgroups |
| ZFS | Yes (via userquota) | Yes | No | ZFS native |
| F2FS | Limited | Limited | No | F2FS native |
Enabling Quotas on ext4
Before managing quotas, you must enable them at the filesystem level.
Step 1: Mount with Quota Options
Edit /etc/fstab to add quota mount options:
| |
Or for newer systems using project quotas:
| |
Step 2: Remount and Initialize
| |
Step 3: Verify Quota Status
| |
Tool Comparison Overview
| Feature | quota Tools | quotatool | Webmin Quota Module |
|---|---|---|---|
| Interface | Command-line (CLI) | Command-line (CLI) | Web browser |
| Package | quota | quotatool | Webmin (built-in) |
| Set Limits | edquota (interactive) | quotatool (one-liner) | Web form |
| View Usage | quota, repquota | quotatool -q | Web dashboard |
| Batch Operations | Shell loops + setquota | Script-friendly | Bulk edit via web |
| Remote Management | SSH + CLI | SSH + CLI | HTTPS web interface |
| User Self-Service | No | No | No |
| Graphs/Charts | No | No | Yes (RRD-based) |
| Alerts | Manual (warnquota) | No | Email alerts |
| Multi-Server | Manual per-server | Manual per-server | Webmin cluster mode |
| Learning Curve | Medium | Low | Low |
| Docker Support | Via host mount | Via host mount | Via Webmin container |
quota Tools — The Traditional CLI Suite
The quota package is the standard Linux quota management toolkit, included in virtually every distribution. It provides several complementary tools for different aspects of quota management.
Installation
| |
Key Commands
| Command | Purpose |
|---|---|
edquota | Edit user/group quotas (opens editor) |
setquota | Set quotas non-interactively (scriptable) |
quota | Display user quota usage |
repquota | Report quotas for all users on a filesystem |
quotacheck | Scan filesystem and build quota files |
quotaon / quotaoff | Enable/disable quota enforcement |
warnquota | Send email warnings to over-quota users |
quotastats | Display kernel quota statistics |
Setting User Quotas
| |
The values are:
- blocks: Current usage (1K blocks, read-only in editor)
- soft limit: Warning threshold (in 1K blocks)
- hard limit: Absolute maximum (in 1K blocks)
- inodes: Current file count (read-only)
- soft limit: Warning file count
- hard limit: Maximum file count
Setting Group Quotas
| |
Viewing Quota Usage
| |
Automated Warnings
| |
Docker Deployment
Quota management requires host filesystem access:
| |
quotatool — The Scriptable One-Liner
quotatool is a command-line utility designed specifically for setting quotas from scripts and automation. Unlike edquota (which opens an interactive editor), quotatool accepts all parameters as command-line arguments.
Installation
| |
Setting Quotas
| |
Bulk Operations
quotatool shines when setting quotas for many users:
| |
Quota Report
| |
Webmin Quota Module — The Web Interface
Webmin is a web-based system administration tool that includes a comprehensive quota management module. It provides a graphical interface for viewing and editing quotas, plus usage graphs and email alerts.
Installation
| |
Accessing the Quota Module
- Navigate to
https://your-server:10000/ - Log in as root
- Go to System → Disk Quotas
- Select the filesystem to manage
Features
The Webmin quota module provides:
- User quota editor: Set soft and hard limits via web form
- Group quota editor: Set group-wide limits
- Usage graphs: Visual charts of quota consumption over time
- Bulk operations: Apply the same limits to multiple users
- Email alerts: Configure notifications when users approach limits
- Quota reports: Export usage reports in CSV format
- Grace period management: Adjust grace periods per filesystem
Docker Deployment for Webmin
| |
Comparing Workflow Efficiency
| Task | quota Tools | quotatool | Webmin |
|---|---|---|---|
| Set one user quota | edquota -u (editor) | quotatool -u (one-liner) | Web form click |
| Set 100 user quotas | Shell loop + setquota | Shell loop + quotatool | Bulk upload CSV |
| View all quotas | repquota -s (terminal) | quotatool -a -q | Web dashboard |
| Send warnings | warnquota (manual) | Not available | Automatic email |
| Historical trends | Not available | Not available | RRD graphs |
| Remote management | SSH required | SSH required | HTTPS browser |
Why Self-Host Disk Quota Management?
Running your own quota management infrastructure ensures that storage limits are enforced locally, without depending on external services or cloud provider APIs. This matters for several reasons.
Complete control over policies: Self-hosted quota management lets you define exactly who gets what limits, with per-user, per-group, and (on XFS) per-project granularity. You can implement tiered storage policies — giving developers 50 GB, QA teams 20 GB, and shared projects 100 GB — without any external dependency. For storage capacity planning and usage analysis, see our disk usage analyzer comparison for complementary tools that work alongside quota enforcement.
No cloud dependency: Cloud storage quotas (AWS EBS volume limits, GCP persistent disk quotas) are controlled by the provider and cannot be customized per-user. Self-hosted Linux quotas give you fine-grained control that cloud providers do not offer. When managing multi-tenant storage, combine quota enforcement with backup strategies — our Docker volume backup guide covers automated backup of quota-managed volumes. For filesystem-level replication and disaster recovery, our storage replication guide covers keeping quota data synchronized across servers.
Audit and compliance: Self-hosted quota systems maintain detailed usage logs that can be audited for compliance. The repquota output provides a complete snapshot of every user storage consumption at any point in time, suitable for chargeback billing, capacity planning, and regulatory reporting.
Cost control: On self-hosted infrastructure, storage is a finite resource. Quotas prevent any single user or application from consuming disproportionate space, ensuring fair allocation across all services. This is especially important on servers running multiple workloads — databases, web applications, and file sharing — where one runaway process can starve others.
FAQ
What is the difference between soft and hard quota limits?
A soft limit is a warning threshold — when a user exceeds it, they receive warnings but can continue writing data. A grace period (typically 7 days) gives them time to reduce usage. A hard limit is an absolute ceiling — once reached, no more writes are permitted and the user gets EDQUOT (Disk quota exceeded) errors. Think of soft limit as a yellow light and hard limit as a red light.
Which filesystem supports quotas best?
XFS has the most complete quota support, including user, group, and project quotas with native kernel integration. ext4 supports user and group quotas via the quota subsystem (requires enabling mount options). Btrfs uses qgroups (quota groups) which are powerful but have a different configuration model. ZFS has native user and group quota properties settable via zfs set userquota@username=10G pool/dataset. For most self-hosted servers, ext4 or XFS with the standard quota tools is the simplest approach.
Can quotas be set on Docker containers?
Docker does not natively support filesystem quotas on container overlay filesystems. However, you can enforce storage limits using the --storage-opt size=10G flag (requires the devicemapper storage driver), or by mounting a quota-enabled host directory into the container and managing quotas on the host filesystem. For ZFS-backed Docker hosts, you can set per-dataset quotas that apply to container data directories.
How do I find users who are close to their quota limits?
Use repquota to generate a report and filter:
| |
What happens when a user exceeds their quota?
When a user exceeds their soft limit, they receive warnings (if warnquota is configured) but can continue writing. When they hit their hard limit, any attempt to write more data fails with EDQUOT error. Applications handle this differently — some show “disk full” errors, others silently drop data. It is critical to monitor quota usage and alert administrators before hard limits are reached.
Can I set quotas on NFS-mounted directories?
Yes, but with limitations. NFSv4 supports quota propagation from the server to clients, but the quota must be set on the server filesystem. The client sees the quota but cannot modify it. NFSv3 does not propagate quotas at all — the client has no visibility into server-side limits. For multi-server environments, manage quotas on the central storage server (NFS export host) rather than individual clients.