[Samba] NFS quotas: truncated files without warning

SER.RI-TIC - David Losada david.losada at urv.cat
Fri Jun 15 18:23:49 GMT 2007


mmm... well, it doesn't seem to be working like that in the version that
ships with RHEL4. I will get around to try it on a fresh build on monday
and report to you about it.

However, I can imagine it would result in quite a big performance hit
all around. If the 'syncy' behaviour could be restricted to the "set
allocation size" call, maybe that would be a little bit less painful ;)

Pity about linux NFS client semantics, it was working nice in Solaris.
Maybe should nag the kernel mantainer for this code ;)

Right, looking at performance, we should be serving SMB from the NAS
appliances. Will need to look again at the possibilities these
appliances offer.

kind regards and thanks again,


En/na Jeremy Allison ha escrit:
> On Fri, Jun 15, 2007 at 10:48:58AM -0700, Jeremy Allison wrote:
>   
>> On Fri, Jun 15, 2007 at 07:44:22PM +0200, SER.RI-TIC - David Losada wrote:
>>     
>>> Hi Jeremy,
>>>
>>> thank you for the tip. Unfortunately, this hasn't proved succesful.. how
>>> I tested it:
>>>
>>> from W2K, as an user with a completely full quota, I drop a 11788 byte
>>> file into the share. It produces the following system calls in the server:
>>>
>>> write(25, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
>>> 4096) = 4096
>>> write(25, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
>>> 4096) = 4096
>>> write(25, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
>>> 3596) = 3596
>>>
>>> (4096+4096+3596 = 11788)
>>>
>>> so my Samba is verifying the availability of storage space through the
>>> write() system call, which doesn't generate NFS quota errors, ugh. The
>>> thing is that an fsync() after these write() calls would probably get me
>>> the NFS quota error... maybe it's implemented this way in a newer Samba
>>> release?
>>>       
>> Yes, that's what we do (I wrote the code :-). I'll add code to
>> force an fsync after these writes if "strict sync" is also set.
>>
>> I'll post the patch for 3.0.25 once I've done it.
>>     
>
> Actually, I've checked the code and this should already be
> being done.
>
> The secret is to set :
>
> strict allocate = yes
> strict sync = yes
> sync always = yes
>
> So force the flush - normally we only do the fsync if the
> client asks for it on the write call.
>
> Jeremy.
>
>   



More information about the samba mailing list