[Samba] Doubled Quotas on Ubuntu

Justin Mazzola Paluska jmp at editshare.com
Mon Mar 3 09:36:43 MST 2014


Hi all,

I'm seeing doubled quotas on Windows 7 when connecting to Samba.  By 
doubled, I mean that if I set a 1GB group quota on Linux, I see a 2GB 
quota on Windows 7.  The quotas seem correct with Samba 3.6.19 running 
on a Linux 2.6.32 kernel on Mandriva; they are incorrect with Samba 
3.6.22 on a Linux 3.12 kernel on Ubuntu.  What could be wrong?

In more detail, I'm testing on both a Mandriva 10.0 system and an Ubuntu 
12.04 system.  I set up a share and put a 1GB group quota on the group 
that owns the directory the share points to.  Both machines are using 
XFS as the underlying file system.

On the working Mandriva machine, level=10 logs show:

[2014/01/29 11:30:21.517932, 5] smbd/trans2.c:3224(smbd_do_qfsinfo) 
smbd_do_qfsinfo : SMB_QUERY_FS_FULL_SIZE_INFO bsize=1024, cSectorUnit=2, 
cBytesSector=512, cUnitTotal=1048576, cUnitAvail=1048572
[2014/01/29 11:30:21.517959, 9] smbd/trans2.c:979(send_trans2_replies) 
t2_rep: params_sent_thistime = 0, data_sent_thistime = 32, useable_space 
= 131012

while stracing the samba process shows:

quotactl(Q_XGETQUOTA|GRPQUOTA, "/dev/sdb", 10057, {version=1, 
flags=XFS_GROUP_QUOTA, fieldmask=0, id=10057, blk_hardlimit=2097152, 
blk_softlimit=2097152, ino_hardlimit=0, ino_softlimit=0, bcount=8, 
icount=11, ...}) = 0

On the incorrect Ubuntu machine, level=10 logs show:

[2014/01/29 09:27:25.429062, 5] smbd/trans2.c:3153(smbd_do_qfsinfo) 
smbd_do_qfsinfo : SMB_QUERY_FS_FULL_SIZE_INFO bsize=1024, cSectorUnit=2, 
cBytesSector=512, cUnitTotal=2097152, cUnitAvail=2097152
[2014/01/29 09:27:25.429103, 9] smbd/trans2.c:941(send_trans2_replies) 
t2_rep: params_sent_thistime = 0, data_sent_thistime = 32, useable_space 
= 131012

while strace shows:

quotactl(Q_GETQUOTA|GRPQUOTA, "/dev/sdb1", 1009, {bhardlimit=2097152, 
bsoftlimit=2097152, curspace=8, ihardlimit=0, isoftlimit=0, 
curinodes=33, ...}) = 0

The quotactl syscall seems to be returning identical information for 
both machines.  However, the Ubuntu machine seems to report 
approximately double the cUnitTotal and cUnitAvail as the Mandriva 
machine.  Why would that be?

Thanks!
     --Justin





More information about the samba mailing list