fear of (a) average mind

you are human, no thing you do is wrong

smbmount + Mobile LanDisk (External Net Storage) #

i needed a external USB HD enclosure and on a whim i got a very generic one from Maplin with NAS, why not. icabod very kindly made a blog post with a lot of info for those Googling it so i decided to make a post about how to mount it in Linux with smbmount. It does the job via USB no problem, but i wanted to use NAS.

It worked fine in Windows:

Login to LanDisk web interface (default IP 169.254.0.1 in browser, default username/password is admin/admin).
Click "SMB Server" and share a folder.
Click Status and make note of Host Name (something like Storage-1234).
In Windows make shortcut or map network drive to \\Storage-1234\SHAREFOLDERNAME (1234 will be different for you).
Easy.
Had a few problems mounting the SMB shared folder from Linux/Debian with smbmount. Kept getting:
mount error 5 = Input/output error
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

To begin with, this is the command that worked:
smbmount //192.168.1.11/SHAREFOLDER /mnt/LanDisk -o nounix,noserverino,sec=none,rw
The nounix is what fixed it.

Everything on my network has a static IP so in the LanDisk web interface/IP Config i changed the IP to 192.168.1.11. Which means to login to the web interface i put 192.168.1.11 in my browser. i won't go into setting up your network IPs in this post but just make sure you know your LanDisk IP as it's easier than using the Host Name (Storage-1234) which wouldn't resolve for me.

Install Samba:
apt-get -y install smbfs

Make mount point:
mkdir /mnt/LanDisk

Mount with:
smbmount //192.168.1.11/SHAREFOLDER /mnt/LanDisk -o nounix,noserverino,sec=none,rw
(changing 192.168.1.11/SHAREFOLDER to the IP and share folder name you use)
*NOTE* sec=none if you didn't set a password in LanDisk web interface/SMB Server so you won't be prompted for a password. If you did set a password replace sec=none with password=YOURPASSWORD or just remove sec=none to be prompted for a password.

To mount at boot time:

Make mount point:
mkdir /mnt/LanDisk

Edit fstab:
nano /etc/fstab

Add:
//192.168.1.11/SHAREFOLDER /mnt/LanDisk smbfs rw,nounix,noserverino,user,noauto,sec=none 0 0

Mount with:
mount /mnt/LanDisk

Easy:
ls -a /mnt/LanDisk

Read/Write                                               rw
LanDisk don't do Unix:                             nounix
Client generates inode numbers:             noserverino
Let users mount the LanDisk:                  user
Network isn't up yet, LanDisk not on:     noauto

Hope this helps.