LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-18-2014, 10:26 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 844

Rep: Reputation: 40
mount.cifs Cannot allocate memory OR Remote I/O error after data transfer


I have started to experience a very odd problem with mount.cifs.
In fact it might be not a problem with mount.cifs itself but with Windows 7 machine which actually share resource/dir. However its difficult for me to figure out that. (Its also difficult to choose right sub-forum for this case).
It is odd that it has started to be happening like this only since yesterday.

Here is a story:
I have 2 Linux boxes - Slackware 13.37 and latest Ubuntu 14.04 plus Windows 7 box.
On Windows 7 I share 1 directory using Windows SHARE allowing to my user have full access / permission (RW)

From time to time I mount this shared DIR on one of my Linux boxes to transfer some files to Windows box.
Starting since yesterday I have started to experience following problem:
After coping some portion of data, I am not able to copy another portion of data or even ls on mounted dir.
If I try to re-mount the share I got following errors (note its different for each system):

Slackware:
Code:
root@slacx:~#  mount.cifs //164.48.174.216/backup /mnt/zip/ -o user=user1
Password:
mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Ubuntu:
Code:
root@ubuntu:~# mount.cifs //164.48.174.216/backup /mnt/zip/ -o user=user1
Password for user1@//164.48.174.216/backup:
mount error(121): Remote I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Rebooting Linux box does not help but rebooting Windows box does help BUT only for 1st copy operation.
I would say it is Windows problem but then it makes me wonder why it was working OK for so long time and all of the sudden it stopped.

Any ideas here?

Last edited by czezz; 06-18-2014 at 10:29 AM.
 
Old 06-20-2014, 04:32 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Try to mount the slice with the "noserverino" option. You may not be able to follow hardlinks, but since you're pushing instead of pulling, that shouldn't matter.
From the above referenced Man page
Quote:
INODE NUMBERS
When Unix Extensions are enabled, we use the actual inode number provided by the server in response to the POSIX calls as
an inode number.

When Unix Extensions are disabled and "serverino" mount option is enabled there is no way to get the server inode number.
The client typically maps the server-assigned "UniqueID" onto an inode number.

Note that the UniqueID is a different value from the server inode number. The UniqueID value is unique over the scope of
the entire server and is often greater than 2 power 32. This value often makes programs that are not compiled with LFS
(Large File Support), to trigger a glibc EOVERFLOW error as this won´t fit in the target structure field. It is strongly
recommended to compile your programs with LFS support (i.e. with -D_FILE_OFFSET_BITS=64) to prevent this problem. You can
also use "noserverino" mount option to generate inode numbers smaller than 2 power 32 on the client. But you may not be
able to detect hardlinks properly.
 
Old 09-30-2014, 05:02 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 844

Original Poster
Rep: Reputation: 40
If anyone is experiencing similar problem then here is solution:
http://boinst.wordpress.com/2012/03/...windows-share/

This is Windows problem and following registry values need to be changed:
Code:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache - set it to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size - set it to 3
Restart service "Server"
 
2 members found this post helpful.
Old 02-29-2016, 03:26 PM   #4
GreyGnome
LQ Newbie
 
Registered: Oct 2010
Location: Oak Park, IL
Distribution: RHEL 5.3, Fedora
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by czezz View Post
If anyone is experiencing similar problem then here is solution:
http://boinst.wordpress.com/2012/03/...windows-share/

This is Windows problem and following registry values need to be changed:
Code:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache - set it to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size - set it to 3
Restart service "Server"
I had problems with both Windows and Linux machines, and found this link: http://winhlp.com/node/40

Essentially, for posterity, they say, "Here is the offending registry value:

Code:
    HKEY_LOCAL_MACHINE
     \SYSTEM
      \CurrentControlSet
       \Services
        \LanmanServer
         \Parameters
    IRPStackSize DWORD 0x0000000f (15)
Check for the presence of the value named IRPStackSize. If it doesn't exist, create it as type DWORD and make sure you have the capitalization absolutely correct (5 upper case, 7 lower case characters), because the system strangely seems to depend on that. Make sure also that you haven't by mistake added a leading or trailing space..."

The issue, at least in our case, is that Win 7 Pro is not initially optimized as a server but that's how we want to use it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM
cifs mount - cp read Cannot allocate memory ccraddock Linux - Desktop 0 06-24-2008 04:23 PM
Error inserting CIFS: Cannot allocate memory pazo Linux - General 0 12-18-2007 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration