Enable Quotas not working ubuntu

21 posts / 0 new
Last post
#1 Wed, 05/29/2013 - 17:28
Xencored

Enable Quotas not working ubuntu

Howdy

Enable Quotas will not enable for some reason

Here is the mount command

mount
/dev/root on / type ext4 (rw,relatime,quota,usrquota,grpquota,stripe=256,data=ordered,usrquota,grpquota)
devtmpfs on /dev type devtmpfs (rw,relatime,size=2011660k,nr_inodes=502915,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /sys/kernel/security type securityfs (rw,relatime)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=402428k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
/dev/md1 on /boot type ext4 (rw,relatime,errors=remount-ro,data=ordered)

Any ideas why? Cheers

Wed, 05/29/2013 - 22:04
andreychek

Howdy,

Hmm... are you by chance using an OpenVZ-based VPS?

-Eric

Thu, 05/30/2013 - 05:14 (Reply to #2)
Xencored

Now than Eric no its a fully dedicated server. It's also a fresh install of Virtualmin

Thu, 05/30/2013 - 09:17
andreychek

Yeah it looks like you should be all setup for quotas... do you receive any errors when attempting to enable them?

Also, if you go into System Settings -> Re-Check Config, does that discover any problems?

-Eric

Thu, 05/30/2013 - 09:33
Xencored

Yea I get

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

Full check below if needed

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
Your system has 3.84 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
Mail server Postfix is installed and configured.
 
Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.
 
Apache is installed.
 
The following PHP versions are available : 5.3.10 (/usr/bin/php5-cgi)
 
Webalizer is installed.
 
Apache is configured to host SSL websites.
 
MySQL is installed and running.
 
ProFTPd is installed.
 
Logrotate is installed.
 
SpamAssassin and Procmail are installed and configured for use.
 
ClamAV is installed and assumed to be running.
 
Plugin AWstats reporting is installed OK.
 
Plugin Mailman is installed OK.
 
Plugin Protected web directories is installed OK.
 
Using network interface eth0 for virtual IPs.
 
IPv6 addresses are available, using interface eth0.
 
Default IP address for virtual servers is 5.39.78.152.
 
Default IP address is set to 5.39.78.152, which matches the detected external address.
 
Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /home. Quota editing has been disabled.
 
All commands needed to create and restore backups are installed.
 
The selected package management and update systems are installed OK.
 
.. your system is ready for use by Virtualmin.
Thu, 05/30/2013 - 10:02
andreychek

Thanks for the info!

Do you receive any particular error when attempting to enable quotas?

-Eric

Thu, 05/30/2013 - 10:29
Xencored

Nothing Eric it just looks like it is refreshing the page.

Thu, 05/30/2013 - 12:09
andreychek

Hmm, one thing you could try is to restart the quotas.

To do that, run this command as root:

/etc/init.d/quota restart

Then restart Webmin:

/etc/init.d/webmin restart

After doing that, does that show quotas as being enabled, or allow you to enable them?

-Eric

Thu, 05/30/2013 - 12:19
Xencored

Got this on the first command

/etc/init.d/quota restart
 * Turning off quotas...                                                        quotaoff: Cannot stat() mounted device /dev/root: No such file or directory
                                                                         [ OK ]
quotaon: Cannot stat() mounted device /dev/root: No such file or directory
Thu, 05/30/2013 - 13:10
andreychek

Aha! We sometimes see that on Xen-based VPS's, I don't think I've seen that on a freshly installed dedicated server... that's odd!

However, it should be a simple fix.

The device /dev/root has to exist -- it should be a symlink to the partition your root filesystem resides on.

So if your root filesystem resides on /dev/sda1, /dev/root should be a symlink that points to /dev/sda1.

-Eric

Thu, 05/30/2013 - 13:20
Xencored

I see would I fix this via some command Eric?

Thu, 05/30/2013 - 18:44
andreychek

You can use the "ln" command to create a symlink. The exact command depends on the device your root filesystem resides on. Do you know what that is?

You can determine that with the "mount" command.

-Eric

Thu, 05/30/2013 - 19:08
Xencored

No I don't know what that is Eric :( am new to all this. I ran mount on the first post is that what is needed?

Cheers

Thu, 05/30/2013 - 22:04
andreychek

Aha! That is indeed what I wanted. Though there's something unusual about that...

If you run the command "cat /etc/fstab", what output does that show?

Thanks!

-Eric

Fri, 05/31/2013 - 03:38 (Reply to #14)
Xencored

Here you go Eric

 cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/md6        /       ext4    grpquota,usrquota,rw    0       1
/dev/md1        /boot   ext4    errors=remount-ro,relatime      0       1
/dev/sda5       swap    swap    defaults        0       0
/dev/sdb5       swap    swap    defaults        0       0
proc            /proc   proc    defaults                0       0
sysfs           /sys    sysfs   defaults                0       0
devtmpfs        /dev    devtmpfs        rw      0       0
Fri, 05/31/2013 - 08:33
andreychek

So the problem I'm trying to sort out in my head here, is why your /etc/fstab file shows /dev/md6 as the device to use for the root filesystem... but when running mount, it's showing that it's mounted /dev/root.

I'm not sure if that would normally catch my attention, but in this particular case the quota script is saying that /dev/root doesn't even exist. So that's a bit puzzling!

However, we can try moving forward with setting up /dev/root as a symlink and see if that resolves the quota issue.

Before we do that though, I just wanted to be absolutely certain that this command returns an error about the file not existing:

ls -l /dev/root

Fri, 05/31/2013 - 09:00 (Reply to #16)
Xencored

Got this Eric

 ls -l /dev/root
ls: cannot access /dev/root: No such file or directory

I'll also do all them commands again just to be safe ( I could of logged on wrong server or something silly like that)

Mount

 mount
/dev/root on / type ext4 (rw,relatime,quota,usrquota,grpquota,stripe=256,data=ordered,usrquota,grpquota)
devtmpfs on /dev type devtmpfs (rw,relatime,size=2011660k,nr_inodes=502915,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /sys/kernel/security type securityfs (rw,relatime)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=402428k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
/dev/md1 on /boot type ext4 (rw,relatime,errors=remount-ro,data=ordered)

cat /etc/fstab

 cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/md6        /       ext4    grpquota,usrquota,rw    0       1
/dev/md1        /boot   ext4    errors=remount-ro,relatime      0       1
/dev/sda5       swap    swap    defaults        0       0
/dev/sdb5       swap    swap    defaults        0       0
proc            /proc   proc    defaults                0       0
sysfs           /sys    sysfs   defaults                0       0
devtmpfs        /dev    devtmpfs        rw      0       0
Fri, 05/31/2013 - 10:05
andreychek

Okay, something is still a little odd, but for getting quotas enabled, I do think creating a symlink would be the next step.

You can do that by running this command:

ln -s /dev/md6 /dev/root

After that, are you able to enable quotas?

-Eric

Fri, 05/31/2013 - 10:13
Xencored

Well it did something Eric lol :P

/ (users) / (groups) New Linux Native Filesystem RAID device 6 User and Group Quotas Active Disable Quotas

Looks like it enabled.

Cheers for all the help Mike

Fri, 05/31/2013 - 10:26
Xencored

Yup all working now Eric cheers!

Sat, 11/05/2016 - 18:52
Buzzi

Hey, have the same issue. I followed this thread up to post #18. Unfortunately ln -s /dev/md6 /dev/root didn't work. The error message said: ln: failed to create symbolic link '/dev/root': File exists I still get the error message when I try to enable quotas Failed to turn on quotas : quotaon: using //aquota.user on /dev/vda1 [/]: No such process quotaon: Quota format not supported in kernel.

Anyone an idea? Thanks

Topic locked