Disk quotas do not work in ext4

Bug #334474 reported by ignasi
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
quota (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Jaunty by Brian Murray

Bug Description

Description: Ubuntu jaunty (development branch)
Release: 9.04

Disk quotas do not seem to work for ext4. cat /etc/fstab | grep /dev/md2 shows:

/dev/md2 on / type ext4 (rw,relatime,errors=remount-ro,quota,usrquota,grpquota)

root@isp0:/# quotacheck -avugm
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

Revision history for this message
Laurent Dinclaux (dreadlox) wrote :

I confirm.

Wouldn't that be the fix: http://marc.info/?l=linux-fsdevel&m=122532700130950&w=2 ?

Changed in quota (Ubuntu):
status: New → Confirmed
Revision history for this message
JanG (jan-ge) wrote :

why is quota not updated in ubuntu when there is a fix for this bug?

Revision history for this message
JanG (jan-ge) wrote :

using quota in version 3.17-2 from karmic repos fixes this for me, so quota should at least be backported for jaunty.

Revision history for this message
Almacha (almacha) wrote :

I confirm ext4 quotas work on karmic but not on jaunty.

My quota version on jaunty: 3.16-7
My quota version on karmic: 3.17-3

Revision history for this message
BenKochie (ben-nerp) wrote :

Also confirmed fixed with backported 3.17-3.

From the upstream changelog:

Changes in quota-tools from 3.16 to 3.17
* add EXT4 (not only EXT4DEV) to the list of supported filesystems (Mingming Cao)

It would be nice to have quota 3.17 backported to Jaunty.

Revision history for this message
Chuck Short (zulcss) wrote :

Fixed for karmic. This is probably a good candiate for an SRU.

Regards
chuck

Changed in quota (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Vinyo (vinyo) wrote :

I have changed my debian server to Ubuntu-server (jaunty).
It would be importance for me to work the qouta, because there are many users on my server.

Updated my qouta 3.16x to 3.17-3 and then 3.17-5 but still not work correctly.

I tried it with webmin and with edquota,

I set up qouta for a test user with the following settings:
Block soft limit 10000 (10MB), hard limit 20000 (20MB),
File soft limit 5 and hard limit 10
Grace time: 10 minutes.

The file limit works fine: if user reach the hard limit, ubuntu don't allow to create new file or directory. (mesg :Disk qouta exceeded)
But if block hard limit exceeded (without reaching file limits) the users can create new file, but cannot create new directory (in his home direcotry.)
If I check this user's qouta it can be seen that quota is exceeded.

I reformatted this parttition with ext3 fs, and everything works fine.

I would like to know when there will be a solution for this case?
Is there any now?

Revision history for this message
Almacha (almacha) wrote :

I tried to reproduce Vinyo's bug but I could not.

I use Ubuntu karmic i386, quota version is 3.17-3ubuntu1.

1. I formated 2 partitions, one with ext3 and the other with ext4.
2. I added them to /etc/fstab with options rw,usrquota.
3. I ran quotacheck -a and rebooted by computer.
4. I used edquota to set a block hard limit of 10MB to my user on both partitions.
5. I tried creating a too big file on each of these two partitions with my user. It stopped when the block hard limit was reached, complaining about disk quota being exceeded.

So I had the same (correct) behaviour with both ext3 and ext4.

Revision history for this message
Thomas Schweikle (tps) wrote :

Same problem with later Ubuntu-Versions. Quota does not work as expected:
!root@ilx01:/# ls -la /users
!total 32
!drwxr-xr-x 5 root root 4096 2011-02-15 18:02 .
!drwxr-xr-x 26 root root 4096 2011-07-14 11:04 ..
!drwxr-xr-x 59 root root 4096 2011-08-31 11:53 dirs
!drwxr-xr-x 59 root root 4096 2011-08-31 11:53 home
!drwx------ 2 root root 16384 2011-02-15 17:50 lost+found
!-rw------- 1 root root 0 2011-09-05 18:23 quota.group
!-rw------- 1 root root 0 2011-09-05 18:23 quota.user

!root@ilx01:/# quotacheck -g -u -c -m -v -a
!quotacheck: Skipping 192.168.180.2:/share/xlxctmpl [/opt/xlxctmpl]
!quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

!root@ilx01:/# mount
![...]
!/dev/mapper/vg00-users on /users type ext4 (rw,errors=remount-ro,usrquota,grpquota)

!root@ilx01:/# cat /etc/mtab
![...]
!/dev/mapper/vg00-users /users ext4 rw,errors=remount-ro,usrquota,grpquota 0 0

!root@ilx01:/# cat /proc/mounts
![...]
!/dev/mapper/vg00-users /users ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered,usrquota,grpquota 0 0

Revision history for this message
Thomas Schweikle (tps) wrote :

I had to restart the whole machine to make it work. It did not help to

! umount /users
! mount /users

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.