No quotas set on /home file system

Have you discovered a bug? Tell us about it.
Post Reply
lstein89
Posts: 1
Joined: Wed 12. Mar 2025, 04:22

No quotas set on /home file system

Post by lstein89 »

STOP - Please read the next lines carefully!

1) Please fill out the post template below completely!
2) The members of this forum provide their valuable time to help! In return, please provide as much information as possible and be specific in your error description. Posts that show little initiative will probably not get good responses!

You may remove this top portion of the post template.
However, do not remove the following post template under any circumstances.
---------------------------------------------------------------------------


I'm sure the cause of the problem is within KeyHelp
Yes


Server operating system + version
Ubuntu 24.04 (irrelevant)


Server virtualization technology used
kvm (irrelevant)


KeyHelp version + build number
25.0 Build 3398


Problem description / error messages
I was noticing that Keyhelp was not reporting disk space usage correctly. Checking the logs for the Calculate Disk Space maintenance task, I noted that web space was not being counted.

After a bit of investigation, I discovered KeyHelp only sets quotas on the root filesystem, regardless of where the user home directories reside.

If you follow best practices, user home directories should be on a dedicated partition apart from system files. Ditto for log directories, mail spool directories, and other directories that could potentially increase in size quickly or should have special mount options. This is how I have always set things up (managing Linux servers - largely web servers specifically - for 25+ years).

KeyHelp should take note if /home or /home/users is a separate partition and set quotas on the correct file system.


Steps to reproduce
Install KeyHelp on server with dedicated /home or /home/users partition
Create user with disk space limit
Check disk quotas/Calculate Disk Space logs


Expected result
Quotas should be set on user home directories
KeyHelp should report correct disk usage per user


Actual result
No quotas are set for home directories. Keyhelp reports 0 (zero) web space usage.

Code: Select all

Disk quotas for user swift (uid 5001):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/sda3                         0   41943040   41943040          0  5242880  5242880
  /dev/sda4                   1839364          0          0      99333        0        0

Code: Select all

Client name : swift

Diskspace   : 1.40 MiB / 40.00 GiB - 0.00%
- Webspace  : 0 B
- Emails    : 88.00 KiB
- Databases : 1.31 MiB

Additional information
This is my current partitioning scheme. For production, /var or /var/spool/mail would likely also be a separate partition

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during curtin installation
/dev/disk/by-uuid/521a09d7-cf00-49fe-ba57-4899a8e0f2a5     /     ext4     defaults,usrquota,grpquota     0     1
# /home was on /dev/sda4 during curtin installation
/dev/disk/by-uuid/b90fb26e-7951-4e08-a51c-237c8bbd1c8b /home/users ext4 defaults,nodev,noexec,relatime,usrquota,grpquota 0 2
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/EF74-CDCA /boot/efi vfat defaults 0 2
tmpfs /var/tmp tmpfs size=10%,nosuid,noexec 0 0
tmpfs /tmp tmpfs size=10%,nosuid,noexec 0 0
User avatar
Florian
Keyweb AG
Posts: 1580
Joined: Wed 20. Jan 2016, 02:28

Re: No quotas set on /home file system

Post by Florian »

Hallo,

if you use a seperate partion for home you must change the Keyhelp database:

`settings` -> `category` 'quota' and `name` 'file_system'
Set the `value` to your mountpoint
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply