Problems with Samba 2.2.0 on Solaris 8 with quotas

Shirish Kalele kalele at
Wed Jun 13 16:53:57 GMT 2001

> Toni Verdu Carbo wrote:
> >  Everything seems to work ok, except for the quotas... I have quotas
> > set on all home directories. When some user gets near the quota limit, I
> > files with zero size. The problem seems to appear when user has almost
> > all it's available disk space, and try to copy a file of a size of
almost the
> > remaining quota space. Windows 98 doesn't complain, the file seems to
> > been copied ok, but in fact it turns to be a zero size file... Trying to
> > copy a file that clearly surpasses the remaining quota space gives a
> > disk" message... Any idea? I can post a real example uf needed...
> This has been seen before, and Jeremy fixed the NT
> variant of the problem when one of the user community
> succeeded in reproducing it reliably.
This might not be related to Toni's problem, but I also found some
redirectors that did this in such a scenario (nearing quota limits or disk
space limits):

1. First they try doing a zero-byte write to an offset equaling the size of
the file being written (copied).
2. NTFS seems to allocate space at this point itself, so NT servers return
an NT_STATUS_DISK_FULL error here.
3. The client then sets the delete-on-close flag on the file.
4. Some RDRs then close the file. Others seem to try to open the file again
and expect to see an NT_STATUS_DELETE_PENDING error denied them the open.
This convinces them that the flag has been set and they then close the file.

Samba 2.2.0 currently returns a disk-full error when the actual data is
being written to the file and when this write fails with a quota-exceeded or
no-space error from the OS.

However, some redirectors that do the above seem to depend only on the
zero-byte write to decide if there is enough space or not. They don't handle
failures at a later point (when the actual data writes occur). This leaves
sparse files on the server.

I know Jeremy thinks doing space checking on zero-byte writes would slow
things down. But how frequent are these zero-byte writes?


More information about the samba-technical mailing list