EDQUOT
Linux / POSIXERRORNotableFilesystemHIGH confidence
Disk Quota Exceeded
Production Risk
Common in multi-user systems; applications should handle EDQUOT gracefully.
What this means
EDQUOT (errno 122) is returned when a write operation would exceed the user or group disk quota on the filesystem.
Why it happens
- 1User disk quota has been reached
- 2Group quota exceeded on a shared filesystem
- 3NFS quota exceeded on the remote filesystem
How to reproduce
write() that would exceed disk quota.
trigger — this will error
trigger — this will error
// Writing data that would exceed quota ssize_t n = write(fd, buf, sizeof(buf)); // Returns -1, errno = EDQUOT
expected output
write: Disk quota exceeded (EDQUOT)
Fix 1
Check and increase disk quota
WHEN When users encounter EDQUOT
Check and increase disk quota
# Check current quota usage quota -u username # Show all quotas repquota -a # Increase quota for a user (as root) edquota -u username # Or set quota limits directly: setquota -u username 5120000 5632000 0 0 /
Why this works
edquota edits quota limits; numbers are in filesystem blocks (usually 1KB each).
Fix 2
Clean up user files to free quota
WHEN When quota increase is not an option
Clean up user files to free quota
# Find large files consuming quota du -sh ~/.* ~/* | sort -h | tail -20 # Remove unneeded files rm -rf ~/old-project/
Why this works
Deleting files frees quota allocation; use du to identify the largest consumers.
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev