[Samba] Difference between real and reported disk usage

Bjoern Baumbach bb at sernet.de
Fri Dec 14 08:31:55 MST 2012


Dear Cesare,

On 12/14/2012 03:51 PM, Berni CED wrote:
>> > I've retried commenting out this line and repeating the entire copy with
>> > robocopy: now the disk usage corresponds to the one reported by Windows and by
>> > "du -s -h --apparent-size".
> To summarize, in my case "strict allocate = yes" has caused samba server to use
> 123 GB do store 45 GB of effective data. That is there is a lot more wasted
> space (78 GB) than data (45 GB)!

This is by design.
With the strict allocate = yes Samba stops creating sparse files. If you
copy a sparse file with a real size of e.g. 100MB and a
reserved/allocated size of 1GB to a server with "strict allocate = yes",
the server writes 900MB trailing zeros to the file :-)

Please refer to smb.conf(5) manual page and look for "strict allocate".

Best regards,
Björn

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba mailing list