Thursday, January 12, 2012

How to Resolve “mount error(12): Cannot allocate memory” on a Windows Share

If you mount a Windows 7 share using Samba/CIFS you may run into "mount error(12): Cannot allocate memory" if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:

  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.
Once you have done that you should be able to mount the share using a command like "sudo mount -a" or just reboot the Linux machine.

Source : http://jlcoady.net/windows/how-to-resolve-mount-error12-cannot-allocate-memory-windows-share


1 comment:

Anonymous said...

Worked for me. Thanks!