Skip to content

Commit 4e71fca

Browse files
committed
Update public documentation according to CLOS-3334 investigation
1 parent f9e3a80 commit 4e71fca

File tree

2 files changed

+112
-2
lines changed

2 files changed

+112
-2
lines changed

docs/cloudlinuxos/command-line_tools/README.md

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3351,10 +3351,15 @@ cloudlinux-config set --json --data '{"options":{"uiSettings":{"hideRubyApp":fal
33513351
### cl-quota
33523352
33533353
* [General provisions](./#general-provisions)
3354+
* [Known cl-quota limitations behaviour](./#known-cl-quota-limitations-behaviour)
3355+
* [cPanel User File Synchronization](./#cpanel-user-file-synchronization)
3356+
* [What is Synchronized](./#what-is-synchronized)
3357+
* [What is NOT Synchronized](./#what-is-not-synchronized)
33543358
* [Setting limits and integration with panel packages](./#setting-limits-and-integration-with-panel-packages)
33553359
* [Limits inheritance](./#limits-inheritance)
33563360
* [Caching and synchronizing the limits](./#caching-and-synchronizing-the-limits)
33573361
* [Quotas DB file](./#quotas-db-file)
3362+
* [Troubleshooting](./#troubleshooting)
33583363
* [CLI options/examples](./#cli-options-examples)
33593364
33603365
<span class="notranslate">**cl-quota**</span> utility is designed to control <span class="notranslate">disk quotas</span> and provides:
@@ -3402,6 +3407,50 @@ cat /var/log/messages | grep clquota
34023407
You should not set soft limit higher than hard limit. cl-quota does not control it in any way, but in some cases, the system can ban such limits combination and they won’t be set or will be set in some other way.
34033408
:::
34043409
3410+
#### Known cl-quota limitations behaviour
3411+
3412+
::: tip Key Points Administrators Should Know:
3413+
3414+
* **User Creation**: All users (including panel users) are created with limits equal to 0
3415+
* **Synchronization Timing**: Limits are applied within 5 minutes of user creation via automatic cron job
3416+
* **File Discrepancies**: cPanel user files may show different values than actual enforced limits
3417+
* **Cache Mechanism**: Non-root users see cached data from `/etc/container/cl-quotas.cache`
3418+
* **Package Inheritance**: Users inherit package limits unless individual limits are set
3419+
* **Special Values**:
3420+
- `0` means inherit from package or uid=0
3421+
- `-1` means unlimited (displayed as dash `-`)
3422+
- Words "default" and "unlimited" are interchangeable with 0 and -1
3423+
* **Auto-Sync Control**: Can be disabled via `cl_quota_limits_autosync=no` in `/etc/sysconfig/cloudlinux`
3424+
* **Root User**: Limits are never set for root (uid=0) but stored for inheritance
3425+
* **Validation**: cl-quota doesn't validate soft/hard limit relationships
3426+
:::
3427+
3428+
#### cPanel User File Synchronization
3429+
3430+
* <span class="notranslate">cl-quota</span> does **NOT** synchronize inode limits with cPanel user configuration files (<span class="notranslate">`/var/cpanel/users/*`</span>)
3431+
* Changes made through LVE Manager to package inode limits are correctly applied at the system quota level but do **not** update the corresponding user files
3432+
* This can result in discrepancies where:
3433+
- <span class="notranslate">`/var/cpanel/packages/packagename`</span> shows updated limits
3434+
- <span class="notranslate">`/var/cpanel/users/username`</span> shows old limit values
3435+
- System quota (<span class="notranslate">`repquota`</span>) and API show correct current limits
3436+
- Actual quota enforcement works correctly despite the file discrepancy
3437+
3438+
#### What is Synchronized
3439+
3440+
<span class="notranslate">cl-quota</span> synchronizes the following:
3441+
* Internal quota database file (<span class="notranslate">`/etc/container/cl-quotas.dat`</span>)
3442+
* cPanel package files
3443+
* System-level quota limits
3444+
3445+
#### What is NOT Synchronized
3446+
3447+
<span class="notranslate">cl-quota</span> does **NOT** synchronize:
3448+
* cPanel user configuration files (<span class="notranslate">`/var/cpanel/users/*`</span>)
3449+
3450+
::: tip Note
3451+
The lack of user file synchronization does not affect the actual quota enforcement. Inode limits are applied at the system quota level and function correctly regardless of what is stored in cPanel user files. The discrepancy is cosmetic and affects only file-based configuration visibility.
3452+
:::
3453+
34053454
#### Setting limits and integration with panel packages
34063455
34073456
@@ -3520,6 +3569,63 @@ It follows that:
35203569
35213570
* The users of <span class="notranslate"> pack1 </span> package will get <span class="notranslate"> pack1 </span> limits (5000:-1), the users of all the rest of the packages will get the limits of uid=0 because no limits are set for them. Exceptions: uid=500 and 958. uid=500 has both limits set individually, and uid=958 inherits only <span class="notranslate"> soft </span> limits.
35223571
3572+
#### Troubleshooting
3573+
3574+
**Inode Limits Synchronization Issues**
3575+
3576+
If you notice discrepancies between different sources showing inode limits, this is likely due to the [known limitations](#known-cl-quota-limitations-behaviour) of <span class="notranslate">cl-quota</span>. Here's how to troubleshoot:
3577+
3578+
**How to check actual limits**
3579+
3580+
To check what limits are actually enforced, please use these commands:
3581+
3582+
<div class="notranslate">
3583+
3584+
```bash
3585+
# Check system quota (this is what's actually enforced)
3586+
repquota -u /
3587+
3588+
# Check specific user quota
3589+
quota -u username
3590+
3591+
# Check what cl-quota thinks the limits are
3592+
cl-quota
3593+
3594+
# Check package limits
3595+
cl-quota --package-limits
3596+
```
3597+
</div>
3598+
3599+
**Script to verify user package and actual limits via CLI**
3600+
3601+
<div class="notranslate">
3602+
3603+
```bash
3604+
# Script to show user, package, and actual quota comparison
3605+
for userfile in /var/cpanel/users/*; do
3606+
user=$(basename "$userfile")
3607+
plan=$(grep '^PLAN=' "$userfile" | cut -d= -f2)
3608+
3609+
# Get package limits
3610+
pkg_soft=$(grep '^lve_inodes_soft=' "/var/cpanel/packages/$plan" 2>/dev/null | cut -d= -f2)
3611+
pkg_hard=$(grep '^lve_inodes_hard=' "/var/cpanel/packages/$plan" 2>/dev/null | cut -d= -f2)
3612+
3613+
# Get user file limits
3614+
user_soft=$(grep '^lve_inodes_soft=' "$userfile" 2>/dev/null | cut -d= -f2)
3615+
user_hard=$(grep '^lve_inodes_hard=' "$userfile" 2>/dev/null | cut -d= -f2)
3616+
3617+
# Get actual system quota
3618+
actual_quota=$(repquota -u / | grep "^$user " | awk '{print $6 ":" $7}')
3619+
3620+
echo "User: $user, Package: $plan"
3621+
echo " Package limits: ${pkg_soft:-N/A}:${pkg_hard:-N/A}"
3622+
echo " User file limits: ${user_soft:-N/A}:${user_hard:-N/A}"
3623+
echo " Actual quota: ${actual_quota:-N/A}"
3624+
echo "---"
3625+
done
3626+
```
3627+
</div>
3628+
35233629
#### CLI options/examples
35243630

35253631

@@ -3933,4 +4039,4 @@ For resellers' users with reseller limits enabled admin should use the <span cla
39334039
```
39344040
cloudlinux-limits set --reseller-name res1 --default all --json
39354041
```
3936-
</div>
4042+
</div>

docs/cloudlinuxos/limits/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ End users can monitor their inodes usage through cPanel only (not available on P
391391

392392
End user can also see the usage inside resource usage menu.
393393

394+
::: tip Important Note about Synchronization
395+
When using inode limits with cPanel, please note that changes made through LVE Manager may not be reflected in cPanel user configuration files (<span class="notranslate">`/var/cpanel/users/*`</span>). This is a known limitation where the actual quota enforcement works correctly, but the user files may show outdated limit values. See [Known cl-quota limitations behaviour](/cloudlinuxos/command-line_tools/#known-cl-quota-limitations-behaviour) and [Troubleshooting](/cloudlinuxos/command-line_tools/#troubleshooting) for more details.
396+
:::
397+
394398
## Network traffic bandwidth control and accounting system
395399

396400
:::tip Note
@@ -742,4 +746,4 @@ Possible parameter values:
742746
* lve-wrappers >= 0.7.2
743747
* lvemanager >= 7.5.9
744748
* kmod-lve >= 2.0.36
745-
* lve >= 2.1.2
749+
* lve >= 2.1.2

0 commit comments

Comments
 (0)