XFS quotas enabled post installation on old server not working due to Virtualmin confused with original /home config

Operating system:
CentOS Linux release 7.8.2003 (Core)

We are using a VM with the XFS file system. When the server was set up, quotas were enabled, but /home was specified:

cat /etc/fstab

/dev/mapper/centos-home /home xfs quota,attr2,grpquota,usrquota,inode64,relatime,rw 0 0

Around after the initial install, it was decided that root volume must be specified instead:

cat /etc/fstab

/dev/mapper/centos-root / xfs defaults 0 0

And quotas never set up. So quotas never worked and box has been active for six months with many sites. Now we needed quotes and installed it in GRUB and fstab. It seems perfect for the OS and Webmin but not Virtualmin: We’ve added quota,usrquota, grpquota to fstab.

  1. In the OS

> mount | grep quota
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,usrquota,grpquota)

> xfs_quota -x -c state
User quota state on / (/dev/mapper/centos-root)
Accounting: ON
Enforcement: ON
Inode: #739207 (25 blocks, 24 extents)
Group quota state on / (/dev/mapper/centos-root)
Accounting: ON
Enforcement: ON
Inode: #981933 (19 blocks, 15 extents)
Project quota state on / (/dev/mapper/centos-root)
Accounting: OFF
Enforcement: OFF
Inode: #981933 (19 blocks, 15 extents)
Blocks grace time: [7 days]
Inodes grace time: [7 days]
Realtime Blocks grace time: [7 days]

  1. In Webmin System / Disk Quotas are fine you can assign and view

  2. Virtualmin fails in a few places:

A. The module could not find the mount point for your home directories filesystem /home. Quotas editing has been disabled.

B. virtualmin list-domains --multiline --domain domainname.com

See error after plugins:
Failed to find mount point for /home/domainame


ID: 152403663922268
File: /etc/webmin/virtual-server/domains/152403663922268
Type: Top-level server
URL: http://domainname.com/

Username: domainname
User ID: 1087
Group name: domainname
Group ID: 1019
Mailbox username prefix: domainname
Password storage: Plain text
Password: Le0bdLat

Created on: 18/Apr/2018 09:30
Created Unix time: 1524036652
Created by: root
IP address: x.x.x.x (Shared)
External IP address: x.x.x.x
Features: unix dir mail web webalizer logrotate webmin
Plugins:
Failed to find mount point for /home/domainame
Bandwidth limit: 100 GiB
Bandwidth byte limit: 107374182400
Bandwidth start: 01/Nov/2020
Bandwidth usage: 40.96 MiB
Bandwidth byte usage: 42950032
PHP execution mode: fcgid
Possible PHP execution modes: mod_php cgi fcgid fpm
SuExec for CGIs: enabled
PHP fCGId subprocesses: None
PHP max execution time: 30
PHP version: 7.3
Webmail redirects: Yes
Match all web sub-domains: No
Server-side includes: Global default
Default website for IP: No
Maximum sub-servers: Cannot create
Maximum alias servers: *
Maximum non-alias servers: *
Maximum mailboxes: Unlimited
Maximum databases: Unlimited
Maximum aliases: Unlimited
Maximum Mongrel instances: Unlimited
Can choose database names: Yes
Can rename servers: Yes
Can migrate backups: No
Sub-servers must be under main domain: No
Sub-servers cannot be under other domains: No
Sub-servers inherit IP address: No
Read-only mode: No
Allowed features: unix dir mail web webalizer logrotate
Edit capabilities: users aliases scripts redirect phpver mail backup sched restore passwd
Allowed scripts: All
Shell type: ssh
Login permissions: Email, FTP and SSH
Shell command: /bin/bash

I suspect it’s something with the Perl detection code which now refers to /home instead of / but I don’t know where to start.

I see a file check_virtual_server_config mentioned here

please provide some direction.

Hi,

To be clear, /home partition is a separate partition or it’s all set under / partition?

What is the output of:

cat /etc/fstab

Good morning @Ilia and thank you so much for your reply.

All is set under / partition.

Current FSTAB

cat /etc/fstab

#
# /etc/fstab
#
/dev/mapper/centos-root /	xfs	quota,attr2,grpquota,usrquota,inode64,relatime,rw	0	0
UUID=a9c6187c-7d38-4266-b818-d086f77086d4 /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

FSTAB when installation was done a year ago:

cat /etc/fstab.backup

#
# /etc/fstab
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=a9c6187c-7d38-4266-b818-d086f77086d4 /boot                   xfs     defaults        0 0
# /dev/mapper/centos-home	/home	xfs	quota,attr2,grpquota,usrquota,inode64,relatime,rw	0	0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

What is the output of:

/etc/default/grub

Hi @Ilia

root]> cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rootflags=uquota,gquota"
GRUB_DISABLE_RECOVERY="true"

@Ilia

Is there some way of “fooling” the system into thinking that quotas are enabled? Like bypass the quota checks? Maybe it will then just work.

… just to be clear - quotas are enabled in Virtualmin Configuration?

… and you re-run config check, and you don’t have a message saying it’s okay?

...
Both user and group quotas are enabled for home and email directories.
...

image

It’s unclear why it doesn’t work for you.

You could try running the following command to patch all needed files for Virtualmin to setup quotas (as it’s done upon initial setup):

virtualmin-config-system -i=Quotas

quotas are enabled in Virtualmin Configuration?

Yes definitely.

When I run re-check configuration the message is:

The module could not find the mount point for your home directories filesystem /home. Quotas editing has been disabled.

Thank you so much for the command line utility, that’s what I was after.

virtualmin-config-system -i=Quotas
[1/1] Configuring Quotas
The filesystem / could not be remounted with quotas enabled.
You will need to reboot your system to enable quotas. [ :warning: ]

I’ll reboot this evening and see if it makes a difference, but I think the server is not well. We have plan to migrate the server to another server soon.

But thanks again so far for all your replies, I am truly honoured to receive these replies. Do you have a Paypal or donate page? I would like to make a small contribution. Virtualmin is an important part of my life.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.