[Samba] NFS quotas: truncated files without warning
SER.RI-TIC - David Losada
david.losada at urv.cat
Fri Jun 15 17:44:22 GMT 2007
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:
4096) = 4096
4096) = 4096
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
En/na Jeremy Allison ha escrit:
> On Fri, Jun 15, 2007 at 06:44:47PM +0200, David Losada wrote:
>> we have some Samba instances serving files from a bunch of NFS exports
>> provided by a NAS appliance. Coming from Solaris, we recently have been
>> testing to run our Samba servers on Linux (RHEL 4, Samba 3.0.10-1.4E.12.2).
>> One caveat we didn't expect is that, on Linux, NFS quota errors are
>> reported on calls to close() or fsync(), but not on calls to write().
>> Through smbclient, we have checked that Samba correctly reports the
>> error to the client (NT_STATUS_DISK_FULL closing remote file ...).
>> However, Windows 2000 clients silently ignore this error when closing
>> the file, leaving the file truncated with no warning to the user
>> (something we really don't want to happen!)
>> We have tried "strict sync = yes" and "sync always = yes" configuration
>> directives, to no avail. Have also googled trying to find an answer, but
>> couldn't find one.
>> I don't think we are the only ones with this kind of setup.. anyone has
>> an idea of how to handle this scenario correctly?
> Try "strict allocate = yes" to which will cause Samba
> to actually allocate space on a Windows client "set allocation
> size" call - this should fail if over quota and be at the
> right place for the Windows clients to see it.
More information about the samba