Re: [Samba] quota on xfs on lvm doesn't work(?)
On 4/20/06, Christoph Peus [EMAIL PROTECTED] wrote: Hi James, thanks for your reply. XFS quotas should work just fine on LVM. To narrow down what is happening, can you please strace an xfs_quota command on the filesystem? Something like this should be sufficient: strace /usr/sbin/xfs_quota -c quota /mnt/tmp I should mention that quota does indeed work in general - I can not use more space than is allowed by the hard limit, and the usage and remaining free space is correctly displayed by 'quota' and 'quot'. The only thing which doesn't work with LVM is the reporting of free space via samba. But perhaps you can see something strange in this output: (Thanks for your support!) testdc / # strace xfs_quota -c quota /mnt/tmp execve(/bin/xfs_quota, [xfs_quota, -c, quota, /mnt/tmp], [/* 27 vars */]) = 0 uname({sys=Linux, node=testdc, ...}) = 0 brk(0) = 0x8929000 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=19381, ...}) = 0 mmap2(NULL, 19381, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbd000 close(3)= 0 open(/lib/libc.so.6, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\271U\1..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1199644, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbc000 mmap2(NULL, 1113396, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eac000 mprotect(0xb7fb5000, 27956, PROT_NONE) = 0 mmap2(0xb7fb6000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x109) = 0xb7fb6000 mmap2(0xb7fba000, 7476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fba000 close(3)= 0 mprotect(0xb7fb6000, 4096, PROT_READ) = 0 mprotect(0xb7fd7000, 4096, PROT_READ) = 0 munmap(0xb7fbd000, 19381) = 0 open(/dev/urandom, O_RDONLY) = 3 read(3, z\177#\245, 4)= 4 close(3)= 0 brk(0) = 0x8929000 brk(0x894a000) = 0x894a000 open(/usr/lib/locale/locale-archive, O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1378768, ...}) = 0 mmap2(NULL, 1378768, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d5b000 close(3)= 0 access(/proc/self/mounts, R_OK) = 0 open(/proc/self/mounts, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc1000 read(3, rootfs / rootfs rw 0 0\n/dev/root..., 1024) = 373 stat64(/mnt/tmp, {st_mode=S_IFDIR|0777, st_size=17, ...}) = 0 read(3, , 1024) = 0 close(3)= 0 munmap(0xb7fc1000, 4096)= 0 open(/etc/projects, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) getuid32() = 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory) close(3)= 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory) close(3)= 0 open(/etc/nsswitch.conf, O_RDONLY)= 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=499, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc1000 read(3, # /etc/nsswitch.conf:\n# $Header:..., 4096) = 499 read(3, , 4096) = 0 close(3)= 0 munmap(0xb7fc1000, 4096)= 0 open(/etc/ld.so.cache, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=19381, ...}) = 0 mmap2(NULL, 19381, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbd000 close(3)= 0 open(/lib/libnss_files.so.2, O_RDONLY) = 3 read(3, [EMAIL PROTECTED]..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=35744, ...}) = 0 mmap2(NULL, 37512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d51000 mmap2(0xb7d59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7d59000 close(3)= 0 munmap(0xb7fbd000, 19381) = 0 open(/etc/passwd, O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=1850, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
Re: [Samba] quota on xfs on lvm doesn't work(?)
On 4/21/06, James Peach [EMAIL PROTECTED] wrote: On 4/20/06, Christoph Peus [EMAIL PROTECTED] wrote: Hi James, thanks for your reply. XFS quotas should work just fine on LVM. To narrow down what is happening, can you please strace an xfs_quota command on the filesystem? Something like this should be sufficient: strace /usr/sbin/xfs_quota -c quota /mnt/tmp I should mention that quota does indeed work in general - I can not use more space than is allowed by the hard limit, and the usage and remaining free space is correctly displayed by 'quota' and 'quot'. The only thing which doesn't work with LVM is the reporting of free space via samba. But perhaps you can see something strange in this output: (Thanks for your support!) testdc / # strace xfs_quota -c quota /mnt/tmp execve(/bin/xfs_quota, [xfs_quota, -c, quota, /mnt/tmp], [/* 27 vars */]) = 0 uname({sys=Linux, node=testdc, ...}) = 0 brk(0) = 0x8929000 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=19381, ...}) = 0 mmap2(NULL, 19381, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbd000 close(3)= 0 open(/lib/libc.so.6, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\271U\1..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1199644, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbc000 mmap2(NULL, 1113396, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eac000 mprotect(0xb7fb5000, 27956, PROT_NONE) = 0 mmap2(0xb7fb6000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x109) = 0xb7fb6000 mmap2(0xb7fba000, 7476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fba000 close(3)= 0 mprotect(0xb7fb6000, 4096, PROT_READ) = 0 mprotect(0xb7fd7000, 4096, PROT_READ) = 0 munmap(0xb7fbd000, 19381) = 0 open(/dev/urandom, O_RDONLY) = 3 read(3, z\177#\245, 4)= 4 close(3)= 0 brk(0) = 0x8929000 brk(0x894a000) = 0x894a000 open(/usr/lib/locale/locale-archive, O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1378768, ...}) = 0 mmap2(NULL, 1378768, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d5b000 close(3)= 0 access(/proc/self/mounts, R_OK) = 0 open(/proc/self/mounts, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc1000 read(3, rootfs / rootfs rw 0 0\n/dev/root..., 1024) = 373 stat64(/mnt/tmp, {st_mode=S_IFDIR|0777, st_size=17, ...}) = 0 read(3, , 1024) = 0 close(3)= 0 munmap(0xb7fc1000, 4096)= 0 open(/etc/projects, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) getuid32() = 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory) close(3)= 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory) close(3)= 0 open(/etc/nsswitch.conf, O_RDONLY)= 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=499, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc1000 read(3, # /etc/nsswitch.conf:\n# $Header:..., 4096) = 499 read(3, , 4096) = 0 close(3)= 0 munmap(0xb7fc1000, 4096)= 0 open(/etc/ld.so.cache, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=19381, ...}) = 0 mmap2(NULL, 19381, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbd000 close(3)= 0 open(/lib/libnss_files.so.2, O_RDONLY) = 3 read(3, [EMAIL PROTECTED]..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=35744, ...}) = 0 mmap2(NULL, 37512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d51000 mmap2(0xb7d59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7d59000 close(3)= 0 munmap(0xb7fbd000, 19381) = 0 open(/etc/passwd, O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3,
[Samba] quota on xfs on lvm doesn't work(?)
Hi, I have a strange problem with user quotas enabled on a xfs filesystem and samba 3.0.21c: When a standard block device (e.g. /dev/sdc1) is used for the fs, quota works like expected: /dev/sdc1 on /mnt/tmp type xfs (rw,usrquota) output from level quota:10 debug: [2006/04/19 14:38:48, 10] lib/sysquotas.c:sys_get_quota(394) sys_get_quota() uid(4004, 4004) [2006/04/19 14:38:48, 10] lib/sysquotas_xfs.c:sys_get_xfs_quota(93) sys_get_xfs_quota: path[/mnt/tmp] bdev[/dev/sdc1] SMB_USER_QUOTA_TYPE uid[4004] [2006/04/19 14:38:48, 10] lib/sysquotas.c:sys_get_quota(404) sys_get_xfs_quota() called for mntpath[/mnt/tmp] bdev[/dev/sdc1] qtype[2] id[4004]. But when a logical volume is used for the fs, it doesn't work, and the clients windows explorer reports the size of the complete fs instead of the users quota: /dev/export/lvol0 on /mnt/tmp type xfs (rw,usrquota) output from level quota:10 debug: [2006/04/19 14:33:57, 10] lib/sysquotas.c:sys_get_quota(394) sys_get_quota() uid(4004, 4004) [2006/04/19 14:33:57, 10] lib/sysquotas_xfs.c:sys_get_xfs_quota(93) sys_get_xfs_quota: path[/mnt/tmp] bdev[/dev/export/lvol0] SMB_USER_QUOTA_TYPE uid[4004] [2006/04/19 14:33:57, 3] lib/sysquotas.c:sys_get_quota(401) sys_get_xfs_quota() failed for mntpath[/mnt/tmp] bdev[/dev/export/lvol0] qtype[2] id[4004]: Permission denied. [2006/04/19 14:33:57, 10] lib/sysquotas.c:sys_get_quota(394) sys_get_quota() uid(4004, 4004) [2006/04/19 14:33:57, 10] lib/sysquotas_xfs.c:sys_get_xfs_quota(101) sys_get_xfs_quota: path[/mnt/tmp] bdev[/dev/export/lvol0] SMB_GROUP_QUOTA_TYPE gid[4000] [2006/04/19 14:33:57, 3] lib/sysquotas.c:sys_get_quota(401) sys_get_xfs_quota() failed for mntpath[/mnt/tmp] bdev[/dev/export/lvol0] qtype[4] id[4000]: Permission denied. What may be the cause for this Permission denied message? Permissions for /mnt/tmp are 777. Shouldn't samba operate independently of the filesystems underlying device? Thanks for your support! Christoph -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba