xfs quota on lvm
Hi,
Ive got alle volumes on linux RH with xfs and all except / "lvmed".
I got quota enabled in kernel, xfs quota support too. Quota is enabled at mount. However when I do eduota -u user, I get only to change numbers on the nonlvm partition.
Is quota nonfunctional on lvm partitions ?
Best regards,
Christophe
Signature · 6 lines
Christophe Zwecker :Sysctl Susannenstr. 26-28 20357 Hamburg phon/fax: +49 40 43099296/7 mail: [email protected]
Quoted 10 lines · Christophe Zwecker
Hi,
Ive got alle volumes on linux RH with xfs and all except / "lvmed".
I got quota enabled in kernel, xfs quota support too. Quota is enabled at mount. However when I do eduota -u user, I get only to change numbers on the nonlvm partition.
Is quota nonfunctional on lvm partitions ?
Should work fine. What does "repquota -vug /dev/XXX" give you on the LVM devices when the filesystems are mounted? (this'll tell you whether quota is enabled at all on these devices). If they are indeed enabled ("Accounting: ON; Enforcement: ON" will be in the output) then try "strace setquota ..." to try to diagnose further (look for quotactl syscalls). setquota is better than edquota for diagnosis because its not interactive, but it interacts with the kernel in much the same way.
cheers.
Signature · 1 line
Nathan
Quoted 12 lines · Nathan Scott
Quoted 10 lines · Christophe Zwecker
Hi,
Ive got alle volumes on linux RH with xfs and all except / "lvmed".
I got quota enabled in kernel, xfs quota support too. Quota is enabled at mount. However when I do eduota -u user, I get only to change numbers on the nonlvm partition.
Is quota nonfunctional on lvm partitions ?
Quoted 8 lines
Should work fine. What does "repquota -vug
/dev/XXX" give you on the LVM devices when the filesystems are mounted? (this'll tell you whether quota is enabled at all on these devices). If they are indeed enabled ("Accounting: ON; Enforcement: ON" will be in the output) then try "strace setquota ..." to try to diagnose further (look for quotactl syscalls). setquota is better than edquota for diagnosis because its not interactive, but it interacts with the kernel in much the same way.
I get this:
[root@bender /root]# repquota -vug /dev/bender/home Not all specified mountpoints are using quota.
I got it like this in fstab:/dev/bender/home /home xfs
defaults,usrquota,grpquota 1 2
/dev/sda2 works tho, its not lvm and as this in fstab:/dev/sda2 / xfs
defaults,usrquota,grpquota 1 1
while booting I can see this:
XFS mounting filesystem sd(8,2)
XFS: WARNING: quotacheck required on readonly filesystem.
XFS: write access will be enabled during mount. XFS quotacheck sd(8,2): Please wait.
XFS quotacheck sd(8,2): Done.
VFS: Mounted root (xfs filesystem) readonly. Freeing unused kernel memory: 316k freed
XFS mounting filesystem lvm(58,1)
XFS quotacheck lvm(58,1): Please wait.
XFS quotacheck lvm(58,1): Done.
XFS mounting filesystem lvm(58,2)
XFS quotacheck lvm(58,2): Please wait.
XFS quotacheck lvm(58,2): Done.
XFS mounting filesystem lvm(58,3)
XFS quotacheck lvm(58,3): Please wait.
XFS quotacheck lvm(58,3): Done.
any ideas ?
thx & best regards,
Christophe
Quoted 55 lines · Christophe Zwecker
Quoted 12 lines · Nathan Scott
Quoted 10 lines · Christophe Zwecker
Hi,
Ive got alle volumes on linux RH with xfs and all except / "lvmed".
I got quota enabled in kernel, xfs quota support too. Quota is enabled at mount. However when I do eduota -u user, I get only to change numbers on the nonlvm partition.
Is quota nonfunctional on lvm partitions ?
Quoted 8 lines
Should work fine. What does "repquota -vug
/dev/XXX" give you on the LVM devices when the filesystems are mounted? (this'll tell you whether quota is enabled at all on these devices). If they are indeed enabled ("Accounting: ON; Enforcement: ON" will be in the output) then try "strace setquota ..." to try to diagnose further (look for quotactl syscalls). setquota is better than edquota for diagnosis because its not interactive, but it interacts with the kernel in much the same way.I get this:
[root@bender /root]# repquota -vug
/dev/bender/homeNot all specified mountpoints are using quota.I got it like this in fstab:
/dev/bender/home/home xfs
defaults,usrquota,grpquota 1 2
/dev/sda2works tho, its not lvm and as this in fstab:/dev/sda2/ xfs
defaults,usrquota,grpquota 1 1while booting I can see this:
XFS mounting filesystemsd(8,2)
XFS: WARNING: quotacheck required on readonly filesystem.
XFS: write access will be enabled during mount. XFS quotachecksd(8,2): Please wait.
XFS quotachecksd(8,2): Done.
VFS: Mounted root (xfs filesystem) readonly. Freeing unused kernel memory: 316k freed
XFS mounting filesystemlvm(58,1)
XFS quotachecklvm(58,1): Please wait.
XFS quotachecklvm(58,1): Done.
XFS mounting filesystemlvm(58,2)
XFS quotachecklvm(58,2): Please wait.
XFS quotachecklvm(58,2): Done.
XFS mounting filesystemlvm(58,3)
XFS quotachecklvm(58,3): Please wait.
XFS quotachecklvm(58,3): Done.
Quoted 1 line
any ideas ?
Hmm... from your boot info we can tell that quota is being activated on all filesystems, but for some reason it looks like the quotactl syscall is failing for these LVM devices (but not the non-LVM device, which is wierd).
The strace output might be useful - could you send me that?
Another thing to try - if you create an ext2 filesystem on one of the LVM devices (might not be an option for you, I know), and enable quota, does repquota work for that fs? This data point would help to narrow down the number of places where things might be going wrong.
cheers.
Signature · 1 line
Nathan
Quoted 8 lines
Hmm... from your boot info we can tell that quota is being activated on all filesystems, but for some reason it looks like the quotactl syscall is failing for these LVM devices (but not the non-LVM device, which is wierd).
The strace output might be useful - could you send me that?
ok, I created a 100MB exct2 partition on lvm, doesnt work either, attached youll find the strace output for:
strace -o setquota.trace setquota -u doc 500 501 100 101/dev/bender/test
The part is mounted user and groupquota.
Hope this helps clearing things up.
Cheers,
Christophe
execve("/usr/sbin/setquota", ["setquota", "-u", "doc", "500", "501", "100", "101", "/dev/bender/test"], [/* 25 vars */]) = 0 uname({sys="Linux", node="bender.zwecker.de", ...}) = 0
brk(0) = 0x8053c8cold_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=39350, ...}) = 0old_mmap(NULL, 39350, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\303"..., 1024) = 1024fstat64(3, {st_mode=S_IFREG|0755, st_size=5723311, ...}) = 0old_mmap(NULL, 1265288, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40021000mprotect(0x4014d000, 36488, PROT_NONE) = 0
old_mmap(0x4014d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12b000) = 0x4014d000 old_mmap(0x40152000, 16008, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40152000 close(3) = 0 munmap(0x40017000, 39350) = 0 brk(0) = 0x8053c8c brk(0x8053cb4) = 0x8053cb4 brk(0x8054000) = 0x8054000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 read(3, "# Locale name alias data base.\n#"..., 4096) = 2601
brk(0x8055000) = 0x8055000 read(3, "", 4096) = 0 close(3) = 0 munmap(0x40017000, 4096) = 0
open("/usr/lib/locale/en_US/LC_IDENTIFICATION", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=370, ...}) = 0old_mmap(NULL, 370, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0open("/usr/lib/locale/en_US/LC_MEASUREMENT", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=28, ...}) = 0old_mmap(NULL, 28, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0open("/usr/lib/locale/en_US/LC_TELEPHONE", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=64, ...}) = 0old_mmap(NULL, 64, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40019000
close(3) = 0open("/usr/lib/locale/en_US/LC_ADDRESS", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=160, ...}) = 0old_mmap(NULL, 160, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001a000
close(3) = 0open("/usr/lib/locale/en_US/LC_NAME", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=82, ...}) = 0old_mmap(NULL, 82, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001b000
close(3) = 0open("/usr/lib/locale/en_US/LC_PAPER", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=39, ...}) = 0old_mmap(NULL, 39, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001c000
close(3) = 0open("/usr/lib/locale/en_US/LC_MESSAGES", O_RDONLY) = 3fstat64(3, {st_mode=S_IFDIR|0755, st_size=28, ...}) = 0
close(3) = 0open("/usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=57, ...}) = 0old_mmap(NULL, 57, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001d000
close(3) = 0open("/usr/lib/locale/en_US/LC_MONETARY", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=291, ...}) = 0old_mmap(NULL, 291, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001e000
brk(0x8056000) = 0x8056000
close(3) = 0open("/usr/lib/locale/en_US/LC_COLLATE", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=21499, ...}) = 0old_mmap(NULL, 21499, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40156000
close(3) = 0open("/usr/lib/locale/en_US/LC_TIME", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=2456, ...}) = 0old_mmap(NULL, 2456, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001f000
close(3) = 0open("/usr/lib/locale/en_US/LC_NUMERIC", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0old_mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40020000
close(3) = 0open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=173408, ...}) = 0old_mmap(NULL, 173408, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4015c000
close(3) = 0socket(PF_UNIX, SOCK_STREAM, 0) = 3
connect(3, {sin_family=AF_UNIX, path=" /var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0open("/etc/nsswitch.conf", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40187000 read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1750
brk(0x8057000) = 0x8057000
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40187000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=39350, ...}) = 0old_mmap(NULL, 39350, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40187000
close(3) = 0open("/lib/libnss_files.so.2", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360 \0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=256603, ...}) = 0old_mmap(NULL, 41584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40191000mprotect(0x4019a000, 4720, PROT_NONE) = 0old_mmap(0x4019a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x4019a000
close(3) = 0
munmap(0x40187000, 39350) = 0
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0fstat64(3, {st_mode=S_IFREG|0644, st_size=2896, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40187000read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2896
close(3) = 0munmap(0x40187000, 4096) = 0open("/usr/share/locale/en_US/LC_MESSAGES/quota.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/quota.mo", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/proc/fs/xfs/stat", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
quotactl(0x1100 /* Q_??? */|USRQUOTA, NULL, 0, {10, 0, 3221224132, 0, 3221224441, 3221224000, 134519360, 3221224438}) = -1 EFAULT (Bad address)open("/etc/mtab", O_RDONLY) = 3
brk(0x8059000) = 0x8059000fstat64(3, {st_mode=S_IFREG|0644, st_size=312, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40187000read(3, "/dev/sda2 / xfs rw,usrquota,grpq"..., 4096) = 312stat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0stat64("none", 0xbffff87c) = -1 ENOENT (No such file or directory)stat64("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0
stat64("/dev/bender/home", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 1), ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0stat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0 stat64("/dev/bender/usr", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 2), ...}) = 0 stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0 stat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0 stat64("/dev/bender/var", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 3), ...}) = 0 stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0 stat64("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0stat64("none", 0xbffff87c) = -1 ENOENT (No such file or directory)stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0
stat64("/dev/bender/test", {st_mode=S_IFBLK|0660, st_rdev=makedev(58, 4), ...}) = 0stat64("/proc/fs/xfs/stat", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
quotactl(0x1100 /* Q_??? */|USRQUOTA, NULL, 0, {134525453, 134575872, 134569064, 134575864, 134575872, 3221223932, 134530842, 134569064}) = -1 EFAULT (Bad address) quotactl(0x5805 /* Q_??? */|USRQUOTA, "/dev/bender/test", 0, {33060, 1, 0, 0, 0, 0, 134479872, 0}) = -1 EINVAL (Invalid argument) quotactl(Q_GETQUOTA|USRQUOTA, "/dev/bender/test", 0, {1075089596, 1075131920, 1075131924, 1073747802, 3221222856, 1075089406, 134571809, 3}) = -1 ESRCH (No such process) stat64("/mnt2/aquota.user", 0xbfffe87c) = -1 ENOENT (No such file or directory)stat64("/mnt2/quota.user", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
open("/mnt2/quota.user", O_RDWR) = 4
flock(4, LOCK_EX) = 0
read(4, "", 8) = 0
lseek(4, 0, SEEK_SET) = 0
read(4, "", 32) = 0
flock(4, LOCK_UN) = 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40187000, 4096) = 0write(2, "Not all specified mountpoints ar"..., 47) = 47_exit(1) = ?
Quoted 15 lines · Christophe Zwecker
Quoted 8 lines
Hmm... from your boot info we can tell that quota is being activated on all filesystems, but for some reason it looks like the quotactl syscall is failing for these LVM devices (but not the non-LVM device, which is wierd).
The strace output might be useful - could you send me that?
ok, I created a 100MB ext2 partition on lvm, doesnt work either, attached youll find the strace output for:
strace -o setquota.trace setquota -u doc 500 501 100 101
/dev/bender/test
Quoted 6 lines
The part is mounted user and groupquota.
...
quotactl(0x5805 /* Q_??? */|USRQUOTA, "/dev/bender/test", 0, {33060, 1, 0, 0, 0, 0, 134479872, 0})= -1 EINVAL (Invalid argument)
...
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/bender/test", 0, {1075089596, 1075131920, 1075131924, 1073747802, 3221222856, 1075089406, 134571809, 3}) = -1 ESRCH (No such process)
... these failing syscalls look like the root cause of your problems. You could try putting some printk() calls in sys_quotactl() in the kernel to figure out exactly where the error comes from. I would guess it is to do with the handling of the "special" parameter, ie. "/dev/bender/test" above, since this is the only part where the LVM device file comes into the picture.
cheers.
Signature · 1 line
Nathan
Quoted 6 lines · Nathan Scott
Quoted 4 lines
...
quotactl(0x5805 /* Q_??? */|USRQUOTA, "/dev/bender/test", 0, {33060, 1, 0, 0, 0, 0, 134479872, 0})= -1 EINVAL (Invalid argument)
...
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/bender/test", 0, {1075089596, 1075131920, 1075131924, 1073747802, 3221222856, 1075089406, 134571809, 3}) = -1 ESRCH (No such process)
Quoted 6 lines
... these failing syscalls look like the root cause of your problems. You could try putting some
printk()calls insys_quotactl()in the kernel to figure out exactly where the error comes from. I would guess it is to do with the handling of the "special" parameter, ie. "/dev/bender/test" above, since this is the only part where the LVM device file comes into the picture.
damn - dunno , got a hint where to put what you are talking about ? because I dont :-)
Signature · 5 lines
Christophe Zwecker mail: [email protected] Hamburg, Germany fon: +49 179 3994867 http://www.zwecker.de "Who is General Failure ? And why is he reading my disk ??"