Quotas are in again

Dejan Ilic svedja at lysator.liu.se
Sun Nov 29 18:23:15 GMT 1998

/* CC to the samba group for "validation". */
/* Why can files "take more than quota-allowed space" on accounts */
/* If my assumptions are correct, it should probably be documented */

Can you do a small test for me ?

Can you copy a file that is larger than quotas ?

And then check the free space on the hard-drive(s)

On my system I copied a 180MB file to a account that can hold 10MB

Here is "before" and "after" free space. Notice that the "180MB-large"
file is on the accout, despite the fact that it can hold only 10MB.

Before the copy.
# df -k
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/dsk/c0t0d1s0    13029980 10270900  2759080 79% /export/users

After the copy.
# df -k
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/dsk/c0t0d1s0    13029980 10280252  2749728  79% /export/users

Notice that only the actual 10MB (approx, I had some other files too)
was taken.

It seems like Solaris does the same, it creates a file tha SEEMS
larger than quotas, but as it is empty, it doesn't count anywhere.
Notice the diference between empty and filled with zeros. Some
filesystem allows you to do that, and the file only takes the space
when you actualy write something in it, whatever it is zeros or actual
data. It seems like Ext2 (Linux) and UFS (SunOS and some other
systems) can do it.

Don't know, maybe Samba should stop the process immediatly when the
copying begins instead of (only) when roof is hitted. I whould hate to
be a owner of 14K-modem that tries to upload a 10MB file only to find
out that you hit the quota a couple KB before the whole file is
transfered... Maybe a additional check when creating the "hole" would
be in place.

Dejan Ilic, Tech Univ. of Linkoping, Sweden    Phone:+46-13-473 01 06
Email: svedja at lysator.liu.se   Web: http://www.lysator.liu.se/~svedja
[finger -l svedja at lysator.liu.se for public PGP key]

More information about the samba-ntdom mailing list