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 192.168.1.2:’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:

Set

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

Set

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

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

creditz:
https://frankooh.wordpress.com/2012/01/02/smbrsync-cannot-allocate-memory/

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.

sources:

http://jlcoady.net/windows/how-to-resolve-mount-error12-cannot-allocate-memory-windows-share
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570898

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin