{"id":45,"date":"2014-02-26T23:34:00","date_gmt":"2014-02-26T23:34:00","guid":{"rendered":"http:\/\/375@jodohost.com\/\/blog\/"},"modified":"2014-02-26T23:34:00","modified_gmt":"2014-02-26T23:34:00","slug":"mount-error12-cannot-allocate-memory","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2014\/02\/26\/mount-error12-cannot-allocate-memory\/","title":{"rendered":"mount error(12): Cannot allocate memory"},"content":{"rendered":"<p>Sometimes when connecting to the Windows shared drive using the Linux\/Windows system, we get the error as below:-<\/p>\n<p>[root@localhost ~]# mount.cifs \/\/192.168.1.5\/home \/mnt\/ -o username=myuser,password=123456<br \/>mount error(12): Cannot allocate memory<br \/>Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)<\/p>\n<p>This error means that we are not able to allocate memory on the source server (which you&#8217;re trying to connect to) and somehow we need to be able to increase the memory on the server. This error actually needs 3 changes to be done on the source server in order to connect to the Windows shared drive:- <\/p>\n<p>1) Increase the system cache for sharing large files in the registry.<\/p>\n<p>Open regedit and set<\/p>\n<p>\u201cHKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\LargeSystemCache\u201d to \u201c1&#8243;.<\/p>\n<p>2) Give priority to file sharing over reducing memory usage.<\/p>\n<p>Open regedit and set <br \/>\u201cHKLM\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\\Size\u201d to \u201c3&#8243;.<\/p>\n<p>3)\u00a0 Check if the IRPStackSize registry entry exists and increase the IRPStackSize value on the server.<\/p>\n<p>Open regedit <br \/>Go to HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters<\/p>\n<p>Click IRPStackSize, click Edit, and then click Modify and then in the Data Value box type a larger value and now click OK to apply this larger value.<\/p>\n<p>If the IRPStackSize entry is not present in this subkey :- <br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Click Edit, point to New, and then click DWORD Value. Type IRPStackSize, and then press ENTER.<\/p>\n<p>Click IRPStackSize, click Edit, click Modify and then in the Data Value box type a larger value, and then click OK.<\/p>\n<p>Then restart the \u201cserver\u201d service or if it is possible to do so, reboot to apply the above changes on the Windows system.<\/p>\n<p>That&#8217;s all that needs to be done on the Windows server. Now try again to connect with the shared drive\/directory\/partition and you&#8217;ll have success.<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes when connecting to the Windows shared drive using the Linux\/Windows system, we get the error as below:- [root@localhost ~]# mount.cifs \/\/192.168.1.5\/home \/mnt\/ -o username=myuser,password=123456mount error(12): Cannot allocate memoryRefer to the mount.cifs(8) manual page (e.g. man mount.cifs) This error means that we are not able to allocate memory on the source server (which you&#8217;re trying [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/45"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":0,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}