Mounting Windows 7 Share on Raspbian Raspberry Pi

Use this command to access windows shared folder with guest user:

sudo mount -t cifs -o guest "//SERVER/share" /mnt/mountfolder

Or use this command for password protected share:

sudo mount -t cifs -o username=user,password=password //SERVER/share /mnt/mountfolder

You can use this command to mount as a user

sudo mount -t cifs -o username=username,password=password,uid=userid,gid=group //SERVER/share /mnt/mountfolder

If mounting a Windows 7 (SMB) share on Linux gives us a “Remote I/O error” like below:

mount error(121): Remote I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Solution #1:

This is Windows problem and following registry values need to be changed:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
set it to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size
set it to 3

Solution #2:

From the man page:
vers = SMB protocol version. Allowed values are:
· 1.0 – The classic CIFS/SMBv1 protocol. This is the default.
· 2.0 – The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is not supported.
· 2.1 – The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.
· 3.0 – The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.

Here is the corrected command which now works for me:

sudo mount -t cifs //192.168.x.x/share ~/share -o username=bob,vers=2.1

Source:
– http://wood1978.dyndns.org/~wood/wordpress/2014/12/17/solve-mount-cifs-remote-io-error-after-data-transfer/

Leave a Reply

Your email address will not be published. Required fields are marked *