[Samba] quota on xfs on lvm doesn't work(?)

James Peach jorgar at gmail.com
Fri Apr 21 07:10:50 GMT 2006


On 4/21/06, James Peach <jorgar at gmail.com> wrote:
> On 4/20/06, Christoph Peus <cp at uni-wh.de> 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, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\33\0\000"...,
> > 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, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> > = 0xb7fc1000
> > read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1850
> > close(3)                                = 0
> > munmap(0xb7fc1000, 4096)                = 0
> > quotactl(0x5807 /* Q_??? */|USRQUOTA, "/dev/export/lvol0", 0, NULL) = 0
> > quotactl(Q_XGETQUOTA|USRQUOTA, "/dev/export/lvol0", 0, 0xbf8d4710) = 0
> > exit_group(0)                           = ?

what I meant to say was ...

Can you please use strace -p to get a trace of the relevant samba process
filing to check the quota?

--
James Peach | jorgar at gmail.com


More information about the samba mailing list