[Samba] extending files slow on FAT filesystems
hofors at lysator.liu.se
Mon Sep 4 12:55:58 GMT 2006
Jeremy Allison <jra at samba.org> writes:
> On Thu, Aug 24, 2006 at 05:51:45PM +0200, Mattias Rönnblom wrote:
> > Hi,
> > I'm running Samba 3.0.23a on Linux. One of my share is a USB disk with
> > a FAT32 filesystem.
> > When copying large files from my Windows XP machine to this share,
> > smbd seem to "reserve" (by using ftruncate()) the space needed on the
> > USB disk before actually doing any copying. This ftruncate() operation
> > takes quite a while when the file is large. It may even cause the
> > client to time out.
> > If I reformat the disk with ext2, ftruncate() runs fast.
> > Is there some way of turning off this "pre-allocation" behaviour? I've
> > consulted smb.conf(5), but I've been unable to find anything of use.
> > Would you consider this a problem in Samba or in the VFAT filesystem
> > driver?
> VFAT system driver. Samba is just calling ftruncate in this
> case. You can control this behaviour by setting "strict allocate = no".
Both strict and not strict allocation policy are painfully slow on
Does anyone know if it's possible to turn off this "truncate-
before-write" behavior in the Windows SMB client?
More information about the samba