OpenWrt Forum Archive

Topic: Can't mount windows share

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello.

NetGear WNR612v2 no USB.
Powered by LuCI Trunk (0.12+svn-r10530) OpenWrt Barrier Breaker 14.07

Out of space.

Dreaming of external storage on Windows machine I did the following:

1. Create two, FAT & NTFS, Windows test shares:
\\192.168.1.2\\wmnfat
\\192.168.1.2\\wmnntf
2. Assign to both of them maximum allowed users access for EveryOne with Full Control.

3. Connect to OpenWrt by Putty SSH as root.
4. Create on OpenWrt two test folders /tmp/xmn & /tmp/xmnsrc

5. Trying to mount-unmount - OK.
root@OpenWrt:~# mount /tmp/xmnsrc /tmp/xmn
root@OpenWrt:~# mount
root@OpenWrt:~# umount /tmp/xmn
root@OpenWrt:~# mount

6. Ping 192.168.1.2 - OK.

7. Trying to mount:
root@OpenWrt:~#
mount -t nfs \\192.168.1.2\\wmnfat /tmp/xmn
mount: mounting \192.168.1.2\wmnfat on /tmp/xmn failed: No such device

I try variouse combinations & quantities of "/ \ :" but all are bad.
Please, advice me a right working syntax of mount command.

And, the second - is there a way to check from OpenWrt - if windows share is accessible - without monting it?
Like in Windows I can check LAN share by:
Dir \\192.168.1.2\wmnfat
.

I have never done this in OpenWrt, but this is how it works using Linux in general:

To mount a SMB share, you must use the "cifs" filesystem type:

mount -t cifs //192.168.1.2/wmnfat /tmp/xmn

To check SMB shares, you have the "smblcient" utility:

smbclient -L //192.168.1.2

eduperez,
thank you. I'll try immediately.
.

Unfortunally failed.
And it's right according to _ttps://wiki.openwrt.org/doc/howto/cifs.client
I have no any packages installed but PPtP only. I'm out of space :(

However, I listen that OpenWrt can act as NFS-client supported on kernel level from box.
Is it right?

root@OpenWrt:~# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.381 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.262 ms
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.276 ms
^C
--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.262/0.306/0.381 ms
root@OpenWrt:~# mount -t cifs //192.168.1.2/wmnfat /tmp/xmn
mount: mounting //192.168.1.2/wmnfat on /tmp/xmn failed: No such device
root@OpenWrt:~# smbclient -L //192.168.1.2
-ash: smbclient: not found

.

You might also read: https://forum.openwrt.org/viewtopic.php … 45#p202745

mount -t cifs //192.168.1.199/ftp-nas /mnt -o username=admin,password=pwww,sec=ntlm,file_mode=0644,unc=\\\\192.168.1.199\\ftp-nas

(that is one line although forum cuts it into two.)

Not quite sure how it goes with the current kernels, but likely you need additional arguments.

(Last edited by hnyman on 23 May 2017, 10:45)

No such device :(
I replaced one-line string with real source & target addresses and with real lgn-pwd.

But, when I use incorrect password the result is the same - No such device.
It seems like share is not accessible at all.
.

You can SMB, but you will need to install the required packages; there is no need to test anything else if you cannot install those packages. You can use NFS too, but you will need a NFS server (so far you have only commented about a SMB server), and you will have to install the required packages (see https://wiki.openwrt.org/doc/howto/nfs.client).

eduperez,

I tried SMB cause it was proposed. And it's good, because both NFS & SMB tests shows that mount command gives error for any reasons but not due to its lacking environment, i.e. the absence of NFS and/or SMB packages. However you say that they both or one of them as minimum are required. In the same time people says the opposite...

I don't know - where is true? I'm only a second day married on OpenWRT and its Linux. And I know only that I'm out of space now. So my hope that NFS or SMB client are supported from box is very-very high. So it's very important are you absolutely sure or not.

Yes, I can reflash router and do not install PPtP package. And instead of it install NFS or SMB or both... But even it will work the next step will to move overlay folder to this external storage and install PPtP on it. Can I do it without internet access (google, this forum etc.)?..

Meantime I made a litle steps forward. I succesfully "mount -t cifs" mentioned FAT share on other Linux-based machine. It means that there are no problems on Windows machine side and on router firewall side. But I can't "mount -t nfs" there in variouse combinations too :(
.

For NFS to work, you need a NFS client and a NFS server, you cannot use a NFS client to a SMB server. Unless you can configure a NFS server in your network (so far you have mentioned only a SMB server), there is no point trying to configure a NFS client.

I cannot comment on "people says the opposite", unless I read it myself... But I know that both NFS and SMB support come in separate packages. If you want to be sure, just execute "cat /proc/filesystems" to see the list of filesytems supported by your current configuration.

The discussion might have continued from here.