nav-left cat-right
cat-right
Matthias Pospiech > Linux > Mount a Samba Share from cheap NAS devices

Mount a Samba Share from cheap NAS devices

I recently bought a NAS device called „LANDISK“ on ebay (search for SAMBA-FTP-USB-2-0-LAN on google).

This device includes a samba server which enables sharing of files on the network. The shared files can be accessed very simple via \\netdisk\\yourshare\. This works under Windows and under Linux in konqueror with smb://netdisk/yourshare.

It would however be nicer to have it mounted into the linux filesystem. Unfortunately at this step Linux fails miserably and leave many users totally frustrated! The problem is that the CIFS filesystem (smbfs was removed from the kernel) does not load the share.

The mount entry in fstab could look like this

//netdisk/myshare /home/myshare cifs rw,guest

This would result in the error message (if mounted manually with mount):

# mount /home/myshare
 Password:
 mount error 20 = Not a directory
 Refer to the mount.cifs( manual page (e.g.man mount.cifs)

If one searches for this error messages in the web it seems that most people expect that the user is doing something wrong and in most cases do not find the solution. The problem is, that the error message is NOT leading to the solution and not describing the problem.

The real reason is, that the samba share uses an old version of the SMB protocol which the CIFS implementation of Linux does not support (in its default configuration). The next problem is, that this can not even be configured directly.

The thing that needs to be modified is the setting for the CIFS Linux Extentions saved in /proc/fs/cifs/LinuxExtensionsEnabled.

The solution is then to add the following lines to /etc/init.d/boot.local

/sbin/modprobe cifs
echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

1 Antwort : “Mount a Samba Share from cheap NAS devices”

  1. Jason Cabot sagt:

    Thanks very much. This tip fixed a problem I was having trying to mount my Freecom NAS in Debian.

Einen Kommentar schreiben

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

*

This blog is kept spam free by WP-SpamFree.