Preallocated file size...
Luis Claudio R. Goncalves
lclaudio at conectiva.com.br
Tue Feb 8 18:30:01 GMT 2000
Howdy again!
I don't belong to the list right now... so if want to reach me,
please reply to my personal address.
> Could you clarify slightly? I would expect
> the file to be truncated, at the limit of the
> quota (or of the physical disk), but I don't
> grok the zero-filled part.
But this is what occurs when you try to write beyond the
quota. This is a feature called sparse files and this serves to
reduce [useless [zero-filled]] disk usage... And you do have this
feature in Solaris, Linux and probably on other systems.
The patch sets the right size of the file.
A friend of mine (Fábio) did a little example on how it works...:
------------------------[ Example 1
olive at thor:~$ dd of=test.sparse seek=10k bs=1
Hi this is a test.
19+0 registros de entrada
19+0 registros de saída
olive at thor:~$ ls -l test.sparse
-rw-r--r-- 1 olive users 10259 Feb 8 16:25 test.sparse
olive at thor:~$ ls -s test.sparse
1 test.sparse
olive at thor:~$ du test.sparse
1 test.sparse
olive at thor:~$ exit
------------------------[ Example 2
olive at thor:~$ dd of=test.sparse seek=10k bs=1
Hi, this is another test.
26+0 registros de entrada
26+0 registros de saída
olive at thor:~$ od -a test.sparse
0000000 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
*
0024000 H i , sp t h i s sp i s sp a n o t
0024020 h e r sp t e s t . nl
0024032
olive at thor:~$ exit
Hope this Helps!
[ Luis Claudio R. Goncalves lclaudio at conectiva.com.br ]
[ BSc in Computer Science -- MSc coming soon -- Gospel User -- Linuxer ]
[ Fault Tolerance - Real-Time - Distributed Systems - IECLB - IS 40:31 ]
[ LateNite Programmer -- Jesus Is The Solid Rock On Which I Stand -- ]
More information about the samba-technical
mailing list