[Samba] Sharing a caching NFS mount with samba?

Andrew Wilkinson drukargin at gmail.com
Thu Mar 10 11:03:58 MST 2011


On Wed, Mar 9, 2011 at 4:30 PM, Andrew Wilkinson <drukargin at gmail.com>wrote:

> On Wed, Mar 9, 2011 at 3:19 PM, Andrew Wilkinson <drukargin at gmail.com>wrote:
>
>> On Wed, Mar 9, 2011 at 9:46 AM, Volker Lendecke <
>> Volker.Lendecke at sernet.de> wrote:
>>
>>> On Wed, Mar 09, 2011 at 09:42:47AM -0800, Andrew Wilkinson wrote:
>>> > Is there any more information I can give that might help anyone better
>>> > understand the scenario?
>>>
>>> Samba does normal posix calls. Can you point out in strace
>>> which of the calls breaks the caching?
>>>
>>> Volker
>>>
>>> --
>>> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
>>> phone: +49-551-370000-0, fax: +49-551-370000-9
>>> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
>>>
>>
>> I'm sorry to say I'm not very familiar with what I should be looking for
>> in the strace outputs.  However, on comparing the outputs of the samba
>> process and a cp process that successfully hit the cache, the only real
>> differences I'm noting are that cp is using read() and samba is using
>> pread().  Samba also does some mojo with fcntl, I believe setting locks on
>> ranges of the file.
>>
>> If you'd like, I can give you those strace logs.
>>
>> Thanks!
>>
>> -Andy
>>
>
> As a point of interest, the option "read raw = no" appears to allow the use
> of the cache.  The hits seem to expire more quickly than they should,
> though, it seems like.  If I don't touch a file for more than a minute or
> so, it copies the whole thing again.
>
> Thanks,
>
> -Andy
>

This is apparently not the whole answer, as trying to duplicate things on
another computer does not appear to have had the same effect.  Of potential
note, the computer that (sorta) works is running kernel 2.6.34 and samba
3.4.12 (gentoo with xen-sources), and the computer that may not work is
running kernel 2.6.35 and samba 3.4.7 (ubuntu).

Any other thoughts?

Thanks,

-Andy


More information about the samba mailing list