[Samba] Doubled Quotas on Ubuntu

Marty Sweet msweet.dev at gmail.com
Wed Mar 5 08:00:34 MST 2014


Hi Justin,

Thanks for posting the solution, I'm sure it will help others in the future.

Marty

On 5 March 2014 14:56, Justin Mazzola Paluska <jmp at editshare.com> wrote:
> Hi all,
>
> It turns out that this is a bug in Samba 3.6 where configure refuses to
> compile XFS quota support because the names of the XFS quota constants
> changed from XFS_QUOTA_* to FS_QUOTA_* in newer (post-June 2010) Linux
> kernels.
>
> The bug has been fixed in 4.0 and 4.1 with the following commits:
>
> commit ee2d6ae1480496c89f483cc3613f025a9342b6ab
> Author: Björn Jacke <bj at sernet.de>
> Date:   Fri Sep 7 13:13:49 2012 +0200
>
>     s3:quota: clean up and consolidate the xfs quota checks and defines
>
>     Autobuild-User(master): Björn Jacke <bj at sernet.de>
>     Autobuild-Date(master): Fri Sep  7 15:59:46 CEST 2012 on sn-devel-104
>
> commit 3810ee4e87eda67583f4458435b28112ee711300
> Author: Björn Jacke <bj at sernet.de>
> Date:   Thu Sep 6 17:00:54 2012 +0200
>
>     s3:sysquota_xfs: fix logic so that we actually use this module on Linux
>
> commit d1623ec025efa74f31db1177727c8cc0d34d03b6
> Author: Björn Jacke <bj at sernet.de>
> Date:   Thu Sep 6 17:26:55 2012 +0200
>
>     s3:sysquota_xfs: check and include the right fs header file for xfs
> quotas
>
> Alternatively, you can patch source3/lib/sysquotas_xfs.c to use the new
> names (patch attached) and recompile 3.6.
>     --Justin
>
>
> On 03/03/2014 11:36 AM, Justin Mazzola Paluska wrote:
>>
>> 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
>>
>>
>>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba


More information about the samba mailing list