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? Regards, Mattias
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". Jeremy.
Gerald (Jerry) Carter
2006-Aug-24 16:01 UTC
[Samba] extending files slow on FAT filesystems
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mattias R?nnblom wrote:> 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....> Would you consider this a problem in Samba or in > the VFAT filesystem driver?IIRC our stance is that it's a problem with the VFAT driver. This issue has some up before. cheers, jerry ====================================================================Samba ------- http://www.samba.org Centeris ----------- http://www.centeris.com "What man is a man who does not make the world better?" --Balian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE7c0tIR7qMdg1EfYRAsGKAKDrKuWgY3vVfh+ZpKimeE3RtkzaVQCg4NVP YfYXwZuU0/z0E1EE8RIAayI=SoD6 -----END PGP SIGNATURE-----