Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Problem using NAS and Moodeaudio - no Files found
#1
Star 
After upgrading from an old version of moodeaudio to the newest Version, I had difficulties connecting my NAS and playing the mp3-files.

I will tell you the problem and the solution, so that someone has the same problem he can hopefully fix it. Smile

Configuration:
Raspberry Zero W with HifiberryDAC connected via Wifi
AVM! Fritzbox 3270 with 256GB USB-Stick
NAS functions activated and user/pw were set.
Both in the same network (direkt wifi-connect, as the Fritzbox is the main router/wifi with DHCP, etc.)

Create Music Source -> SMB Scan doesn't found anything except the own SMB-Shares of MoodeAudio.

So I added the path manually, as I searched the SMB-Share in Windows Explorer (where it was found automatically, like every other SMB-Share in my network) opened it, navigated to the music source-path and copied the path (\\fritz.box\FRITZ.NAS\...\YourPathToMusic) <-- the ... are the Name of the Device which is connected to the fritzbox.
Change the fritz.box to the IP-Adress (default is 192.168.178.1), remove the \\ and change all other \ to / . (so it should look like this: 192.168.178.1/FRITZ.NAS/.../YourPathToMusic )
Type in the correct user/pw which has access to the NAS, type in a Name of the Source (your own choice).

First try doens't seems to work, so I added vers=3, to the Mount-Flags. (older FritzBox Firmware doesn't support SMB > 1, but aber a update in the last year it seems to work with smb v3. At Fritzbox NAS-Configuration you could activate SMB v1 support, but it's not more necessary and only makes the system less secure.

Saving this configuration the green tick appeard in the Library Config Menu near the new source and I startet regenerating the Library and after that "Update Library" in Main-Menu. I'm not shure if its the same function at all... @Tim Curtis ??

After that all directorys under "YourPathToMusic" where shown in the Library, but no files. I startet a terminal, had a look at the logs and moodeutl -t. Started the Update Library again and only one file was found (the stereo test which is on the SD-Card in moodeaudio).

I tried a lot (user and file permissions, ...) and after some hours I found out, that there is a symptom with newer linux-kernels and samba, that sometimes "stale file handle", which denies every access to the files at the mounted devices (in my case the mp3 at the FritzBox NAS).

The solution is to add the parameter noserverino to the Mount-Flags. After that and one more Library-Update everything works fine.

So if you find all your directorys, but no soundfiles. Maybe this will be the solution.

Best Regards and much fun with your music. Cool
MF



PS: To all linux- and samba-pros: can you explain why this happens and what the option really changes?
Reply
#2
The 'noserverino' option has come up before and it's on the TODO list to add it to the default SMB mount flags.

I can prolly slip it into the 8.2.0 release.

You can read about the option at the link below. I'm not a Samba expert so I can't say why the option affects your mount. Maybe it has to do with the way Samba is configured on the NAS ??
https://www.samba.org/~ab/output/htmldoc...ifs.8.html
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(09-09-2022, 12:27 PM)Tim Curtis Wrote: The 'noserverino' option has come up before and it's on the TODO list to add it to the default SMB mount flags.

I can prolly slip it into the 8.2.0 release.

You can read about the option at the link below. I'm not a Samba expert so I can't say why the option affects your mount. Maybe it has to do with the way Samba is configured on the NAS ??
https://www.samba.org/~ab/output/htmldoc...ifs.8.html

I've been feeding SMB shares to moOde for years as we've moved through many major and minor releases. Servers include a virtual Synology DSM, Samba on various Linux hosts, a stand-alone OpenMediaVault appliance on an SBC, even Windows 7 back in the day. I've never had a problem related to stale file handles.

As I read the Samba docs, though, it appears that setting the noserverino option will be harmless in our application.

With the evolution of the scanning code in moOde, I can now reliably scan for SMB shares on my LAN from all the sources I mentioned above. The only fly in the ointment in my case is that there's no local DNS service on the LAN so when, for example, the scan returns "OMV/Music" I have to hand-edit the share to be "OMV.local/Music" for the connection to succeed. The IP address would work as well, of course. [I'm not prepared to recommend that moOde always use mDNS addresses if they are available, but it's a thought.]

I'm not sure why it's necessary for the OP to force "vers=3". Granted I did my testing a while ago when Tim removed the explicit level set in moOde's default string, but at the time moOde could reliably negotiate a connection with servers configured with various minimum and maximum protocol level settings. Will explore again.

Regards,
Kent
Reply
#4
Now, where I do know how to make it work, I could give it a try without the vers-Option. Was the first thing I have been trying, after it didn’t work any more, cause of the late integration of smb >1 at the fritzboxes.
Reply
#5
The Samba scan may or may not find anything or be able to automatically determine the highest SMB protocol supported by the NAS because of network and Router configurations that the scanner is not correctly handling or that block certain protocols used by the scanner utilities (nbmlookup, smbclient, smb-protocols, etc).

This means that some of the mount flags for example vers=, sec=, etc have to be manually entered, and as you discovered adding the noserverino option was necessary in your particular case.

I've added noserverino to the 8.2.0 mount flags :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: