smb/rsync – cannot allocate memory

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:

  1. Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
  2. Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
  3. Restart the “server” service.

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

Advertisements

~ by frankooh on 2012-01-02T19:08:17+00:00.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: