[Samba] Samba + Linux ext3/FS + As/400 + Quotas

Johannes Niess j.niess at uni-bonn.de
Thu Jul 31 11:26:06 GMT 2003


Nicolas Silvestre <nicolas.silvestre at aliacom.fr> writes:

> I'm sorry but I forgot to fill the subject field
> 
> Nicolas Silvestre wrote:
> > This is my first post on this list and I want to say hello to all
> > the contributors.
> > I've tried to set user quota with Samba but it doesn't operate
> > correctly and I don't find any document to help me because the
> > context is not current.

> > - samba 2.2.23

This version does not exist.

> > - Suse 7.3 on iseries (AS/400)
> > - file system ext3
> > May the Linux emulation on AS/400 is not fully compatible ?
> > Have you meet this problem before ?

You have to recompile "./configure --with-quota" to get the quota
displayed as share size. It is not enabled by most vendor binaries.

You need extensive testing for correctnes. On i386 linux I got silent
file truncations when exceeding quota. I just copied files with W2k
explorer. Unfortunately the Samba team could not reproduce it
(yet). For me it happens even without quota when the real (floppy)
disk is full.. Quota just triggers it earlier.

Reason seems to be "sparse" files. Sometimes Windows does a strange
test for disk space: A new file is opened and seeked to the last byte
of data to be written. Then the last byte is written and the return
code used.

Unix tries to be smart and does a kind of run length encoding for all
these unused bytes that have been seeked over. This is accounted with
it's compressed size for quota. So the test succeeds and Windows does
no further error checking. Samba is bound to Unix quota restrictions
and the client has no way to reask the status. The  file is truncated
at quota boundary and ext3 displays full file size to the client.

Setting "strict allocate = yes" in smb.conf is supposed to help, but
it does not for me in this case.

Please report negative _and_ positive test results here to establish
some statistics. Maybe we can find the pattern where things go wrong.

Johannes Nieß



More information about the samba mailing list