PDA

View Full Version : [ViX_Misc] Unable to automount NAS shares anymore.



ccs
18-03-18, 19:28
I've not used autofs mounted filestore connecting to a NAS server for a long time, but it used to work fine.

A couple of days ago I tried it on 5.1.019 and couldn't get it to work, so fresh flashed 5.1.020 with no settings restore and started from scratch.:(

I've spent ages trying without any success.

The error I (always) see when selecting the location from the recordings list is "Directory /media/autofs/ET10000SYNOLOGY/ does not exist."

The directory does exist, but can't be listed/deleted or anything else that I can think of.


root@et10000:~# ls -l /media/autofs
dr-xr-xr-x 2 root root 0 Mar 18 13:41 ET10000SYNOLOGY
root@et10000:~#

root@et10000:~# ls -l /media/autofs/ET10000SYNOLOGY
ls: /media/autofs/ET10000SYNOLOGY: No such file or directory
root@et10000:~#

root@et10000:~# ls -ld /media/autofs
drwxr-xr-x 3 root root 0 Mar 18 16:57 /media/autofs
root@et10000:~#

I set up the share using network browser, (and just about any other way I can think of), with reboots to get it going.
The fact that the browser picks up all the shares on the NAS suggests that it's nearly working.


root@et10000:~# df -a
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 913016 88112 824904 10% /
devtmpfs 559820 4 559816 0% /dev
proc 0 0 0 0% /proc
sysfs 0 0 0 0% /sys
debugfs 0 0 0 0% /sys/kernel/debug
tmpfs 64 0 64 0% /media
tmpfs 559964 136 559828 0% /var/volatile
/dev/sda1 976559616 495183360 480327680 51% /media/hdd
devpts 0 0 0 0% /dev/pts
/etc/auto.network 0 0 0 0% /media/autofs
root@et10000:~#

root@et10000:~# cat /etc/auto.network
# automounter configuration
ET10000SYNOLOGY -fstype=cifs,user=xx,pass=xx,rw,iocharset=utf8 ://192.168.1.115/ET10000
root@et10000:~#

Debug logs aren't showing anything at all, apart from


< 33.158> [Harddisk] new Network Mount ET10000SYNOLOGY -> /media/autofs/ET10000SYNOLOGY

dmesg has this error, but I think it's always been there...


et10000 daemon.crit automount[581]: key "logs" not found in map source(s).

Other bits.......


root@et10000:~# smbd -V
Version 4.4.16

root@synology:/$ smbd -V
Version 4.4.16
Synology Build 15254, Jan 26 2018 07:00:42

I studied this post, but obviously didn't solve the issue...

http://www.world-of-satellite.com/showthread.php?57791-Network-browser-doesn-t-find-shares&p=457557&viewfull=1#post457557

Note: I needed an opkg update before I could get samba installed and running.

Ashley69
18-03-18, 19:45
Are you going through network browser to mount your nas?
Go to network browser.
Once your nas shows up press ok on it.
It will ask for user name and password. Enter and press ok to mount
Exit back to network browser and you should see all your nas folders.
I scrolled down passed the nfs folders and mount the cifs folders. Press ok on the cifs you want to mount.

ccs
18-03-18, 19:48
Are you going through network browser to mount your nas?
Go to network browser.
Once your nas shows up press ok on it.
It will ask for user name and password. Enter and press ok to mount
Exit back to network browser and you should see all your nas folders.
I scrolled down passed the nfs folders and mount the cifs folders. Press ok on the cifs you want to mount.Yes, as I explained above.

Ashley69
18-03-18, 20:04
Sorry missed that bit. I had a similar issue but after a reflash and using the above method it worked.
I don’t need samba installed for mine to work.

birdman
18-03-18, 23:43
Note: I needed an opkg update before I could get samba installed and running.You don't need samba (which is a file server daemon) to access files on a remote file server.
I set this up a month ago in order to test that something worked when using a NAS. I had the same problem. IIRC I resolved it (I do remember resolving it) by installing a missing module on the Vix box. I can't remember which, though.

EDIT: Perhaps the mist clears...
Try installing cifs-utils. It installs mount.cifs, which ISTR automount uses to mount cifs shares (rather than doing it directly).

pmatil
19-03-18, 07:17
I didn't see what Box OP uses, maybe it doesn't matter. But my experience on mounting NAS share (CIFS) using automounter on Vu+ Duo 2 was similar: couldn't get it to mount anything. Can't remember the error message but it may have been similar to OP. Couldn't get it to mount with "enigma2" type either. Only thing that worked was to mount using fstab.

After switching to fstab mount automounter left its config as is (even after several reboots) and the only way to clear it was to edit the file auto.network manually.

All this was with OpenVIX 5.1.013.

ccs
19-03-18, 11:00
You don't need samba (which is a file server daemon) to access files on a remote file server.
I set this up a month ago in order to test that something worked when using a NAS. I had the same problem. IIRC I resolved it (I do remember resolving it) by installing a missing module on the Vix box. I can't remember which, though.

EDIT: Perhaps the mist clears...
Try installing cifs-utils. It installs mount.cifs, which ISTRC automount uses to mount cifs shares (rather than doing it directly).

Cheers - I did actually try installing cifs-utils, but it didn't help.
Having said that I had been trying so many permutations and combinations I probably tried it at the wrong time.

Mist clearing a bit here as well, I do remember ages ago "&" didn't work as a password character, and I did at one point yesterday remove it.
Maybe that was after trying cifs-utils.

I know samba isn't relevant, but I thought the nas version might be - hence the references.

ccs
19-03-18, 11:05
I didn't see what Box OP uses, maybe it doesn't matter. But my experience on mounting NAS share (CIFS) using automounter on Vu+ Duo 2 was similar: couldn't get it to mount anything. Can't remember the error message but it may have been similar to OP. Couldn't get it to mount with "enigma2" type either. Only thing that worked was to mount using fstab.

After switching to fstab mount automounter left its config as is (even after several reboots) and the only way to clear it was to edit the file auto.network manually.

All this was with OpenVIX 5.1.013.

Thanks,

I tried fstab but couldn't get that working either.

I also noticed auto.network was left as is, so it was getting very confusing when trying different things which were failing.

I had to edit them out as well.

birdman
19-03-18, 11:32
Cheers - I did actually try installing cifs-utils, but it didn't help.This is what happens to me without it, then with it....
I have "bad user" mapped to guest on my Samba server, so it doesn't need an id/pwd.


root@mbtwin:/media/hdd/GMLbits# opkg remove cifs-utils
Removing cifs-utils (6.6) from root...

root@mbtwin:/media/hdd/GMLbits# cat /etc/auto.network
# automounter configuration
SMBtestPLUG -fstype=cifs,user=,pass=,rw,iocharset=utf8 ://192.168.1.51/SMBtest

root@mbtwin:/media/hdd/GMLbits# ls /media/autofs/SMBtestPLUG/
ls: /media/autofs/SMBtestPLUG/: No such file or directory

root@mbtwin:/media/hdd/GMLbits# opkg install cifs-utils
cifs-utils: unsatisfied recommendation for kernel-module-cifs
Installing cifs-utils (6.6) on root.
Downloading http://openvixdev.satellites-xml.org/feeds/openvix/developer/5.1/inihdx/mips32el/cifs-utils_6.6-r0_mips32el.ipk.
Configuring cifs-utils.

root@mbtwin:/media/hdd/GMLbits# ls /media/autofs/SMBtestPLUG/
20160208 1957 - BBC TWO HD - University Challenge.eit
20160208 1957 - BBC TWO HD - University Challenge.ts
......
20171122 2200 - BBC FOUR HD - Detectorists.ts.meta

ccs
19-03-18, 11:59
Still no success :confused:

I'm seeing Mar 19 10:50:16 et10000 daemon.crit automount[581]: key "logs" not found in map source(s). in /var/log/messages???

I'm using a valid nas userid and password - that should be ok?

ccs
19-03-18, 12:43
If I go into network browser to set up a share from scratch, I'm seeing mount options I tried yesterday, not the defaults I'd expect.

edit: just tried a different nas share - same problem, but the other share I'm trying to get working still shows in location, despite being disabled.

I think I need to reflash and start from there.

Willo3092
19-03-18, 14:06
I just edit automounts.xml like this:

<?xml version="1.0" ?>
<mountmanager>
<fstab>
<cifs>
<mount>
<active>True</active>
<hdd_replacement>False</hdd_replacement>
<ip>192.168.0.240</ip>
<sharename>Movies</sharename>
<sharedir>Movies</sharedir>
<options>rw,utf8</options>
<username>********</username>
<password>********</password>
</mount>
</cifs>
</fstab>
</mountmanager>

Reboot - go into mount manager and click OK on the mount and OK the 'overwrite existing mountpoint' message and it then mounts successfully.

ccs
19-03-18, 15:21
Fresh flash 5.1.020 with just cifs.utils and no settings restore.

With fstab selected (I tried autofs first and it didn't work), with debugging, I'm seeing...


< error(122): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount: mounting //192.168.1.115/ET10000 on /media/net/ET10000SYNOLOGY failed: Operation not supported
< 37.386>


Mar 19 14:09:13 et10000 daemon.info automount[590]: attempting to mount entry /media/autofs/logs
Mar 19 14:09:13 et10000 daemon.crit automount[590]: key "logs" not found in map source(s).
Mar 19 14:09:13 et10000 daemon.info automount[590]: failed to mount /media/autofs/logs
Mar 19 14:09:13 et10000 daemon.info automount[590]: re-reading map for /media/autofs


root@et10000:~# df -a
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 913016 81000 832016 9% /
devtmpfs 559820 4 559816 0% /dev
proc 0 0 0 0% /proc
sysfs 0 0 0 0% /sys
debugfs 0 0 0 0% /sys/kernel/debug
tmpfs 64 0 64 0% /media
tmpfs 559964 112 559852 0% /var/volatile
/dev/sda1 976559616 536948736 438562304 55% /media/hdd
devpts 0 0 0 0% /dev/pts
/etc/auto.network 0 0 0 0% /media/autofs
root@et10000:~# cat /etc/fstab
rootfs / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
usbdevfs /proc/bus/usb usbdevfs noauto 0 0
tmpfs /var/volatile tmpfs defaults 0 0
//192.168.1.115/ET10000 /media/net/ET10000SYNOLOGY cifs user=xx,pass=xx,_netdev,rw,iocharset=utf8 0 0
root@et10000:~#

It looks like I need to fresh flash each time to avoid partially inheriting previous attempts??

ccs
19-03-18, 16:21
This error crops up after a fresh flash of 5.1.020 and nothing else (apart from setting debug logs).


Mar 19 15:18:13 et10000 daemon.info automount[581]: attempting to mount entry /media/autofs/logs
Mar 19 15:18:13 et10000 daemon.crit automount[581]: key "logs" not found in map source(s).
Mar 19 15:18:13 et10000 daemon.info automount[581]: failed to mount /media/autofs/logs
Mar 19 15:18:13 et10000 daemon.info automount[581]: re-reading map for /media/autofs

ccs
19-03-18, 16:24
I just edit automounts.xml like this:

Reboot - go into mount manager and click OK on the mount and OK the 'overwrite existing mountpoint' message and it then mounts successfully.
If I simply create automounts.xml and go into mount manager after a reboot, there's nothing to see.
There must be other things that you do first.

ccs
19-03-18, 17:07
The more times I edit auto.network and reboot, more and more automounter messages appear in var/log/messages...


Mar 19 16:00:37 et10000 daemon.info automount[580]: attempting to mount entry /media/autofs/ets
Mar 19 16:00:37 et10000 daemon.warn automount[580]: >> mount: mounting //192.168.1.115/ET10000 on /media/autofs/ets failed: Operation not supported
Mar 19 16:00:37 et10000 daemon.info automount[580]: mount(generic): failed to mount //192.168.1.115/ET10000 (type cifs) on /media/autofs/ets
Mar 19 16:00:37 et10000 daemon.info automount[580]: failed to mount /media/autofs/ets
Mar 19 16:01:04 et10000 daemon.notice ntpdate[576]: step time server 85.199.214.101 offset 24.041133 sec
Mar 19 16:01:06 et10000 daemon.info automount[580]: attempting to mount entry /media/autofs/ets
Mar 19 16:01:06 et10000 daemon.warn automount[580]: >> mount: mounting //192.168.1.115/ET10000 on /media/autofs/ets failed: Operation not supported
Mar 19 16:01:06 et10000 daemon.info automount[580]: mount(generic): failed to mount //192.168.1.115/ET10000 (type cifs) on /media/autofs/ets
Mar 19 16:01:06 et10000 daemon.info automount[580]: failed to mount /media/autofs/ets
Mar 19 16:01:13 et10000 daemon.info automount[580]: attempting to mount entry /media/autofs/ets
Mar 19 16:01:13 et10000 daemon.warn automount[580]: >> mount: mounting //192.168.1.115/ET10000 on /media/autofs/ets failed: Operation not supported
Mar 19 16:01:13 et10000 daemon.info automount[580]: mount(generic): failed to mount //192.168.1.115/ET10000 (type cifs) on /media/autofs/ets
Mar 19 16:01:13 et10000 daemon.info automount[580]: failed to mount /media/autofs/ets
Mar 19 16:01:13 et10000 daemon.notice ntpdate[682]: adjust time server 85.199.214.101 offset 0.000888 sec
Mar 19 16:01:16 et10000 daemon.info automount[580]: attempting to mount entry /media/autofs/logs
Mar 19 16:01:16 et10000 daemon.crit automount[580]: key "logs" not found in map source(s).
Mar 19 16:01:16 et10000 daemon.info automount[580]: failed to mount /media/autofs/logs
Mar 19 16:01:45 et10000 daemon.info automount[580]: attempting to mount entry /media/autofs/ets
Mar 19 16:01:45 et10000 daemon.warn automount[580]: >> mount: mounting //192.168.1.115/ET10000 on /media/autofs/ets failed: Operation not supported
Mar 19 16:01:45 et10000 daemon.info automount[580]: mount(generic): failed to mount //192.168.1.115/ET10000 (type cifs)on /media/autofs/ets
Mar 19 16:01:45 et10000 daemon.info automount[580]: failed to mount /media/autofs/ets
Mar 19 16:01:56 et10000 authpriv.info login[740]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Mar 19 16:01:59 et10000 authpriv.notice login[743]: ROOT LOGIN on '/dev/pts/0' from '[::ffff:192.168.1.116]:57491'

birdman
19-03-18, 19:36
This error crops up after a fresh flash of 5.1.020 and nothing else (apart from setting debug logs).


Mar 19 15:18:13 et10000 daemon.info automount[581]: attempting to mount entry /media/autofs/logs
Mar 19 15:18:13 et10000 daemon.crit automount[581]: key "logs" not found in map source(s).
Mar 19 15:18:13 et10000 daemon.info automount[581]: failed to mount /media/autofs/logs
Mar 19 15:18:13 et10000 daemon.info automount[581]: re-reading map for /media/autofsIgnore that. Something seems to be looking for /media/autofs/logs (or, possibly, a logs directory in all mountpoints listed in /proc/mounts...) and autofs just reports that it isn't there. Since it's a daemon it reports it to syslog.

birdman
19-03-18, 19:39
I'm using a valid nas userid and password - that should be ok?It should be. I've never set one (since I only ever run a Samba server to test other people's problems).
I also use autofs to do the mounting. (I'd never hard-wire a network mount into fstab).

ccs
19-03-18, 20:18
Changing the minimum SMB protocol from SMB2 to SMB1 on the NAS, and it now works!!

Anyone understand why? The NAS has had lots of samba updates since I last used autofs, so I assume SMB1 used to be the minimum.

I tried SMB1 yesterday without any success, so I guess other things weren't quite right either at the time.

Thanks for all the suggestions.

I'm going to try again from scratch tomorrow to see how it goes.

birdman
19-03-18, 20:21
I've just successfully mounted a share that needs an id/pwd with this on the command line:

mount -t cifs -o username=xxxxxxx,password=yyyyyyy //plug/local local
That's on both my mbtwin (kernel 3.6.0) and et8000 (kernel 4.10.6) [both cifs-utils 6.6].

My laptop (kernel 4.13.0) requires me to add vers=1.0 to the -o option [cifs-utils 6.7]. (and vers 1.0 is supposed to be the default here...according to the manpage)

ccs
19-03-18, 20:40
@birdman - we were posting at the same time, so you may have missed my last post.:)

birdman
19-03-18, 22:21
@birdman - we were posting at the same time, so you may have missed my last post.:)I did miss it.
You've changed the server, I changed the client (on my laptop).
Not sure whether we were changing the same thing, but I'm glad you've got it working now.

Perhaps I should force my Samba server to use SMB2.....

ccs
20-03-18, 14:23
OK, fresh flash of 5.1.020, no settings or plugins restored - network browser sets up autofs NAS mounts without any issues, using all the default settings.

No need to install cifs-utils, just need to make sure the NAS hasn't changed any defaults!

birdman
20-03-18, 20:56
No need to install cifs-utils, just need to make sure the NAS hasn't changed any defaults!Odd. autofs calls mount, and that will look for mount.cifs to do it. See post #9.

ccs
20-03-18, 22:11
... it doesn't make sense to me from what you'd said earlier.


root@et10000:~# opkg list-installed | grep cifs
root@et10000:~# which mount.cifs
root@et10000:~#

adm
21-03-18, 00:02
OK, fresh flash of 5.1.020, no settings or plugins restored - network browser sets up autofs NAS mounts without any issues, using all the default settings.

No need to install cifs-utils, just need to make sure the NAS hasn't changed any defaults!

Background 5.1.019 installed via couch flash with a settings restore
5.1.020 installed via a software update with previous settings maintained.
No other files downloaded or installed.

I tried mounting a disk attached to my router via a USB connection.

1st attempt: The network browser found the router and the hard disk attached to it. I selected the disk and attempted to mount it (no user or password) using the default settings but changing Server IP to that of the router, changing the mount type to CIFs share and having to give the Local share and Server share a name. The result was the same error message about not finding the disk.

I removed the mount and rebooted the box.
2nd attempt: the network browser found the router BUT didn’t find the disk attached to it. The browser also found all the other relavant equipment on my network.

I rebooted the box.
3rd attempt: The network browser found the router and the hard disk attached to it. I selected the disk and on mounting it (no user or password) the default settings were different to those on the 1st attempt – I only had to change the mount type to CIFs share. The IP was correct, the local share name was filled in and sensible and the server share name was also filled in whereas the latter two names were blank on the 1st attempt. (the names on my 3rd attempt were different to those I typed in the 1st attempt so hadn’t been remembered in some configuration file).
I can now access the disk from my box.