Missing options after the latest update

After the recent update certain options are missing in "Edit Virtual Server/Quotas and Settings".

Right now there is just setting for Bandwidth, all the other like Disk Quota and max email accounts are missing.

Status: 
Closed (fixed)

Comments

Disk quota should still appear on the Edit Virtual Server page, under "Quotas and Limits" .. assuming you are editing a top-level virtual server, not a sub-server.

Limits on email accounts are set at Administration Options -> Edit Owner Limits.

Under "Quotas and limits" there is no option to edit the virtual server's disk quota. This is true for all the virtual servers.

Also, there used to be a section for the top 10 virtual servers disk usage with their set quota on the System Information page. That is no longer there.

I checked to see if quotas were working at the command line and they are.

The issue may be that Virtualmin thinks quotas are disabled on your system.

If you go to System Settings -> Re-Check Configuration, what does it report about disk quotas?

It says:

"Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /home. Quota editing has been disabled."

Quotas are enabled for /home but not for /. Did something change?

x@x:~$ sudo quotaon -p /home group quota on /home (/dev/sdb1) is on user quota on /home (/dev/sdb1) is on x@x:~$ sudo quotaon -p / quotaon: Mountpoint (or device) / not found or has no quota enabled.

It looks like your quotas had been disabled for some reason.

What is the output of the command "mount"?

Also, if you go into Webmin -> System -> Disk Quotas, are you able to enable quotas from within there?

x@x:~$ mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /home type ext4 (rw,grpquota,usrquota)

User and group quotas are enabled on /home.

In Webmin -> System -> Disk Quotas it has a status of "User and Group Quotas Active".

At Webmin -> System -> Disk Quotas , does it show quotas as active on both the / and /home filesystems?

No, just the group and user quotas for the /home filesystem. When Virtualmin setup runs, does it enable quotas for / and also for the filesystem where the user data resides? I don't remember quotas ever being enabled on /.

I believe it does -- as Virtualmin does make use of quotas on other parts of the filesystem.

You may want to try enabling quotas on / -- which you can do from within Webmin -> System -> Disk Quotas.

After enabling quotas on /, do the quota options you previously had show up again?

There isn't an option in there to enable quotas on a new filesystem.

It looks like there is an option to enable quotas on the / filesystem in the Disk and Network Filesystems module in Webmin. Is that where it should be enabled?

I enabled user and group quotas using the Disk and Network Filesystem module in Webmin. Then I clicked on Enable Quotas in Webmin->System->Disk Quotas. After that the options didn't show up until I ran Virtualmin->System Settings->Re-check Configuration. Everything seems happy now.

Edit: except for the top 10 disk usage on the System Information page. Any ideas why that won't show up?

OK, things are not really happy now. After further investigation it is now only using the quotas on / and not /home, which really messes stuff up. / and /home are 2 separate filesystems as you can see by my previous posting of mount.

Which also means all the previous user quota settings are not being taken into account.

This can become a huge problem for us if I don't get this taken care of soon. Any ideas what might have changed after the latest update?

Howdy -- in theory, your filesystem limits should be active on both / and /home.

What is it you're seeing that makes it appear as if they're not working on /home?

There's a few things we can look into regarding that --

  • If you run System Settings -> Re-Check Config, does it still show quotas on /home as being active?

  • If you run "mount", does your /home filesystem show the usrquota and grpquota options as being enabled?

  • The repquota command reports the quota setup for a given filesystem. You could run "repquota /" and "repquota /home" to see what the filesystem thinks the quotas are for each user on those filesystems. When you run "repquota /home", is it showing any limits for your users?

Quotas are working on /home. But Virtualmin does not see them. If quotas are enabled on / it only sees the quotas on that filesystem. If you disable the quotas on / then no quota editing is available - this is what has changed, it used to see those quotas.

Re-check Config says "Both user and group quotas are enabled for home and email directories." But I think it is only checking to see if quotas are turned on for /.

I know quotas are working on /home because I can used all the command line utilities to look at them for specific users and edit them. When the quota editing abilities are enabled in Virtualmin all it is reporting is the quotas for that user on the / filesystem not on /home which is where all the user data is stored plus all the quota settings for all of the sites and their users over the years.

The mount command shows quotas are enabled. See my previous post.

Edit: yes, repquota /home shows all of the expected quota information.

This shows what the problem seems to be:

root@x:~# quota -v user-website.net Disk quotas for user user@website.net (uid 1946):

 Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
  /dev/sda3     676       0       0              78       0       0        
  /dev/sdb1   82456   92160   92160            4202       0       0 

Virtualmin reports the 676 blocks being used and when you set the quota on this account it only modifies the quota on / (/dev/sda3) ignoring the quota on /home (/dev/sdb1). This is what has changed.

The problem may be that Virtualmin thinks that / is the base directory for domains, not /home.

Could you run the following command and let me know the output :

grep home_base /etc/webmin/virtual-server/config /etc/webmin/useradmin/config

/etc/webmin/virtual-server/config:home_base=/home

/etc/webmin/useradmin/config:home_base=/home

That looks ok. Can you also post the contents of the /etc/fstab file from your system?

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda3 during installation
UUID=6134dbed-4fcf-4743-bc6f-99e0f4b2270b / ext4 grpquota,usrquota 0 1
# /boot was on /dev/sda1 during installation
UUID=43eb7819-f3c7-4361-8d12-a04c4cdd2a29 /boot           ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=8369ab6e-17bc-47c7-9a90-a0eca949a9d3 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

/dev/sdb1 /home           ext4    grpquota,usrquota,rw     0       2

Also, some additional problems have surfaced. Disabling a website will not disable admin, email or ftp access.

Edit: We have also had a customer change a password through Usermin w/o the password being changed in the system resulting in an authentication error.

Trying to find some errors in a log file I ran across this for a site in question in Virtualmin->Logs and Reports->Logged Webmin Actions.

Error - Perl execution failed

Global symbol "$line" requires explicit package name at ./webminlog-lib.pl line 95.
Global symbol "$line" requires explicit package name at ./webminlog-lib.pl line 96.
Global symbol "$line" requires explicit package name at ./webminlog-lib.pl line 99.
Global symbol "$line" requires explicit package name at ./webminlog-lib.pl line 100.
Compilation failed in require at /usr/share/webmin/webminlog/search.cgi line 8.

It looks like some settings had changed regarding sites being disabled, I reset them so that should solve that issue. It's just odd that so many little things have gone wrong after the update, although I can't rule out human error with the site disabling issue since there are a few people with access to those settings.

I really would like to see this quota issue resolved since it negatively impacts the core functionality of our shared hosting.

Looks like you are seeing multiple problems here - if you like, we could login to your system and see what is going wrong. Contact me at jcameron@virtualmin.com if that is possible..

Ok, I have found and fixed the issue - in your /etc/fstab file, the line for /home contained both tabs and spaces, which confused Webmin parser. Older versions of Webmin worked OK, as they split up fields in /etc/fstab by either tabs or spaces - but this failed for mounts that had spaces in their names.

I have corrected the file on your system, and will improve parsing of /etc/fstab in the next Webmin release.

Thank you for finding that.

Any idea about what would cause the Perl error from Virtualmin->Logs and Reports->Logged Webmin Actions?

Should I start another support request? I have another issue regarding backups that I can't resolve as well.

The webmin actions log error is a known bug, which will be fixed in the next webmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.