smb/rsync – cannot allocate memory

it’s not the linux/osx machine’s fault… it’s the windows! 😀

To sync a set of files from a linux raid to backup-HDD in a windows machine, you need to mount it (depending on your share, network, etc.) via:

# mount -t cifs /mnt/smb’data’ -o username=bob

Now you could copy your files via:

# rsync -avP /home/user/datadir /mnt/smb/datadir

But after a while windows will not allow to copy any more data and rsync cannot allocate enough memory. This can be allowed via a few registry entries:


HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache to 1


HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size to 3

Restart the “smb-server” service. (in this case the windows machine)


Another problem you might run into is, that the vfat file system is not able to use question marks in file names. Unfortunately ext[2,3,4] can, so you are not able to copy the data. There is a patch for rsync which would transliterate the question marks with other characters, but it is just on the wish list and so you will have to patch it yourself or maybe wait until it is integrated in the next version. Also you could rename all the files with question marks in it or write a script which would do that.