🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now β†’
Menu

Categories

Linux Disk Quota Management: User and Group Storage Limits

Linux Disk Quota Management: User and Group Storage Limits

Disk quotas prevent individual users or groups from consuming excessive storage on shared Linux systems. Without quotas, a single user can fill an entire filesystem, causing service outages for everyone. This guide covers practical quota setup, monitoring, and enforcement on Linux servers.

How Linux Disk Quotas Work

Linux supports two types of quotas:

  • User quotas β€” Limit storage per user account
  • Group quotas β€” Limit storage per group

Each quota has two limits:

  • Soft limit β€” Warning threshold; user can temporarily exceed it during the grace period
  • Hard limit β€” Absolute maximum; cannot be exceeded under any circumstances

Setting Up Disk Quotas

# Install quota tools
apt install quota    # Debian/Ubuntu
yum install quota    # RHEL/CentOS

# Enable quotas in /etc/fstab
# Add usrquota,grpquota to mount options:
# /dev/sda1 / ext4 defaults,usrquota,grpquota 0 1

# Remount and initialize
mount -o remount /
quotacheck -cugm /
quotaon -a

Setting User Quotas

# Interactive editor
edquota -u username

# Command-line (soft=500MB, hard=600MB, no file limits)
setquota -u username 500M 600M 0 0 /

# Set grace period
edquota -t

Monitoring Quotas

pip install dargslan-disk-quota
dargslan-quota report     # Full quota and filesystem report
dargslan-quota users      # User quota listing
dargslan-quota disk       # Filesystem capacity

Best Practices

  • Set quotas on shared filesystems (/home, /var, project directories)
  • Use soft limits with grace periods for warnings before hard enforcement
  • Monitor quota usage in your daily admin routine
  • Alert users approaching their limits before they hit hard caps
  • Regularly review and adjust quotas as storage needs change

Download our free Disk Quota Management Cheat Sheet for essential commands. For deeper Linux storage knowledge, check our Linux & DevOps eBooks.

Share this article:
Dargslan Editorial Team (Dargslan)
About the Author

Dargslan Editorial Team (Dargslan)

Collective of Software Developers, System Administrators, DevOps Engineers, and IT Authors

Dargslan is an independent technology publishing collective formed by experienced software developers, system administrators, and IT specialists.

The Dargslan editorial team works collaboratively to create practical, hands-on technology books focused on real-world use cases. Each publication is developed, reviewed, and...

Programming Languages Linux Administration Web Development Cybersecurity Networking

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.