GoAdmio hosting accounts have a disk-space limit and an inode (file count) limit. /go/quota makes the operating system enforce those limits, so an account that reaches its limit gets "Disk quota exceeded" errors instead of using more space. /go/quota is a one-command setup and sync tool. It: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Enable quotas and apply every account's limits
/go/quota on
# Disable quotas
/go/quota off
# Re-apply limits when quotas are already enabled
/go/quota
Options
There are no --option flags. The only arguments are:
| Argument | Required | Default | Notes |
|---|---|---|---|
on |
No | — | Enables quotas. Reports failure if the filesystem can’t support them yet. |
off |
No | — | Disables quotas. Must be the first argument. |
Where the limits come from
Limits are read from each account in GoAdmio’s Site table. They are set when the account is created (see create) or edited later.
| Account setting | Applied as | Notes |
|---|---|---|
| Disk space (stored in bytes) | Hard block limit, in KB | The soft limit is set to 0, so there is no grace period. |
| Inode | Hard inode limit | The soft limit is set to 0. |
A value of 0 means unlimited for that setting.
Examples
# Enable quotas
/go/quota on
# After changing an account's disk limit, re-apply limits
/go/quota
# Check that quotas are working
repquota -a
quota -uvs example.com
# Turn quotas off
/go/quota off
If quotas can’t be enabled, the command prints these steps. Run them from Rescue Mode, with the device name it shows for /:
tune2fs -O quota /dev/<device>
reboot
Output
| Outcome | What you get |
|---|---|
| Quotas enabled | Quota is successfully enabled. |
| Quotas disabled | Quota is successfully disabled. |
| Enabling failed | Failed to enable quotas. followed by the commands to run in Rescue Mode. |
| Limits applied | One line per account that has a limit, for example [3/12] example.com Disk Space 5120000 KB. |
Notes on the output:
quotacheckandquotaoffoutput is hidden. Only the messages above are printed.- The progress counter
[N/C]is approximate.Ncounts accounts with awwwfolder, andCcounts folders in/homethat have a dot in their name. - Accounts with no limit (disk space and inode both
0) are skipped without any output. - Both
off(success) and a failedonexit with status 1. Use the printed message, not the exit code, to tell them apart. - Every run is logged with a timestamp and its arguments to
/var/log/go/quota.log.
See the full reference at /go/quota and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
