Public bug reported:

Hi

I tried to setup ext4 quotas on an Ubuntu 26.04 system. But quota tool
chain throws warnings/errors ("Cannot stat() mounted device tmpfs: No
such file or directory", "Cannot find filesystem to check or filesystem
not mounted with quota option.").

What I have tested:
#######################################################################################
root@quota-test01:~# lsb_release -rd
Description:    Ubuntu 26.04 LTS
Release:        26.04

root@quota-test01:~# uname -a
Linux quota-test01 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 
16:06:43 UTC 2026 x86_64 GNU/Linux

root@quota-test01:~# apt install quota
...

root@quota-test01:~# apt-cache policy quota
quota:
  Installed: 4.09-1build1
  Candidate: 4.09-1build1
  Version table:
 *** 4.09-1build1 500
        500 http://at.archive.ubuntu.com/ubuntu resolute/main amd64 Packages
        100 /var/lib/dpkg/status

root@quota-test01:~# mount | grep "/data"
/dev/vdb1 on /data type ext4 (rw,noatime,nodiratime)

root@quota-test01:~# cat /etc/fstab | grep "/data"
UUID="73de96cc-bfc6-4c87-b208-1546b90b4476"     /data   ext4    
defaults,noatime,nodiratime     0       2

root@quota-test01:~# blkid | grep "73de96cc-bfc6-4c87-b208-1546b90b4476"
/dev/vdb1: UUID="73de96cc-bfc6-4c87-b208-1546b90b4476" BLOCK_SIZE="4096" 
TYPE="ext4" PARTUUID="7cb8ef58-ae6d-425a-8e38-7955e23d76b5"

root@quota-test01:~# tune2fs -l /dev/vdb1 | grep -i "Filesystem features:"
Filesystem features:      has_journal ext_attr resize_inode dir_index 
orphan_file filetype needs_recovery extent 64bit flex_bg metadata_csum_seed 
sparse_super large_file huge_file dir_nlink extra_isize metadata_csum 
orphan_present

root@quota-test01:~# umount /data

root@quota-test01:~# tune2fs -O quota /dev/vdb1
tune2fs 1.47.2 (1-Jan-2025)

root@quota-test01:~# tune2fs -l /dev/vdb1 | grep -i "Filesystem features:"
Filesystem features:      has_journal ext_attr resize_inode dir_index 
orphan_file filetype extent 64bit flex_bg metadata_csum_seed sparse_super 
large_file huge_file dir_nlink extra_isize quota metadata_csum

root@quota-test01:~# vi /etc/fstab
# add "usrquota,grpquota"

root@quota-test01:~# cat /etc/fstab | grep "/data"
UUID="73de96cc-bfc6-4c87-b208-1546b90b4476"     /data   ext4    
defaults,noatime,nodiratime,usrquota,grpquota   0       2

root@quota-test01:~# systemctl daemon-reload

root@quota-test01:~# mount -a
root@quota-test01:~# mount | grep "/data"
/dev/vdb1 on /data type ext4 (rw,noatime,nodiratime,quota,usrquota,grpquota)

root@quota-test01:~# ls -alhs /data/
total 24K
4.0K drwxr-xr-x  3 root root 4.0K May  8 10:43 .
4.0K drwxr-xr-x 21 root root 4.0K Apr 28 16:12 ..
 16K drwx------  2 root root  16K May  8 10:43 lost+found

root@quota-test01:~# quotacheck -vug "/data"; echo "$?"
quotacheck: Cannot stat() mounted device tmpfs: No such file or directory
quotacheck: Cannot stat() mounted device tmpfs: No such file or directory
quotacheck: Cannot find filesystem to check or filesystem not mounted with 
quota option.
1

root@quota-test01:~# repquota "/data"; echo "$?"
repquota: Cannot stat() mounted device tmpfs: No such file or directory
repquota: Cannot stat() mounted device tmpfs: No such file or directory
*** Report for user quotas on device /dev/vdb1
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      20       0       0              2     0     0       


0

root@quota-test01:~# setquota -u "test-user01" "9000" "10000" 0 0 "/data"; echo 
$?
setquota: Cannot stat() mounted device tmpfs: No such file or directory
setquota: Cannot stat() mounted device tmpfs: No such file or directory
0

root@quota-test01:~# dd if=/dev/urandom of=/data/mytest.dd bs=5M count=1 
1+0 records in
1+0 records out
5242880 bytes (5.2 MB, 5.0 MiB) copied, 0.0306641 s, 175 MB/s

root@quota-test01:~# chown test-user01:test-user01 /data/mytest.dd

root@quota-test01:~# repquota /data; echo $?
repquota: Cannot stat() mounted device tmpfs: No such file or directory
repquota: Cannot stat() mounted device tmpfs: No such file or directory
*** Report for user quotas on device /dev/vdb1
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User              used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root        --      20       0       0              2     0     0       
test-user01 --    5120    9000   10000              1     0     0       


0

root@quota-test01:~# mount | grep quota
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64,usrquota)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64,usrquota)
/dev/vdb1 on /data type ext4 (rw,noatime,nodiratime,quota,usrquota,grpquota)
#######################################################################################


As you can see the used quota commands throw "Cannot stat() mounted device 
tmpfs: No such file or directory" as a warning I think.
"quotacheck" throws "quotacheck: Cannot find filesystem to check or filesystem 
not mounted with quota option." as an error.

Because the quotas seem to work "quotacheck" is maybe not needed anymore
for the new kernel based ext4 quotas? But I have not tested already
filled data disks yet.

I think the "Cannot stat() mounted device tmpfs: No such file or
directory" warning comes from the 2 "tmpfs" mounts ("/tmp" and
"/dev/shm") which are now also use quotas. The quota tools seems to
always scan them even if I explicitly set "/data" as the file system to
use.

Maybe this bug is already fixed in "quota 4.10"
(https://sourceforge.net/projects/linuxquota/files/quota-tools/4.10/) ->
... The biggest news in this release is support for quotas on tmpfs and
bcachefs ...

4.10 was release on "2025-04-25" and 4.11 was released on "2025-12-11".
So I wondered why 4.09 is included in 26.04. But also Debian Sid still
uses 4.09 so maybe there is an issue with the newer versions?

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: quota 4.09-1build1
ProcVersionSignature: Ubuntu 7.0.0-15.15-generic 7.0.0
Uname: Linux 7.0.0-15-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckMismatches: ./boot/grub/i386-pc/eltorito.img ./boot.catalog
CasperMD5CheckResult: fail
Date: Mon May 11 11:09:31 2026
InstallationDate: Installed on 2026-04-28 (13 days ago)
InstallationMedia: Ubuntu-Server 26.04 "Resolute Raccoon" - Release amd64 
(20260420.1)
ProcEnviron:
 LANG=de_DE.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: quota
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: quota (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152171

Title:
  quota toolset throws errors on ext4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/quota/+bug/2152171/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to