NAS network mount

Raspberry Pi related support

Re: NAS network mount

Postby fuddyduddy » 27 Mar 2019, 13:01

Is this it?
Code: Select all
[root@runeaudio ~]# avahi-browse -atrlkp | grep -i -E 'smb|cifs|nfs' | grep -w '='
[root@runeaudio ~]# ls /srv/http/command/rune_s*
/srv/http/command/rune_shutdown
[root@runeaudio ~]# tail -n 15 /srv/http/command/rune_shutdown
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby janui » 27 Mar 2019, 15:42

Hi fuddyduddy,
fuddyduddy wrote:Is this it?
Almost, could you run these:
Code: Select all
id mpd
ls -l /mnt/MPD/NAS
ls -l /mnt/MPD/*
tail -n 15 /srv/http/command/rune_shutdown
You may need to add a manual <enter> after the last line.
And a question, can MPD build up an index and play music stored on your Windows machine?
janui
User avatar
janui
 
Posts: 624
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: NAS network mount

Postby fuddyduddy » 27 Mar 2019, 17:19

janui wrote:Hi fuddyduddy,
fuddyduddy wrote:Is this it?
Almost, could you run these:
Code: Select all
id mpd
ls -l /mnt/MPD/NAS
ls -l /mnt/MPD/*
tail -n 15 /srv/http/command/rune_shutdown
You may need to add a manual <enter> after the last line
I did.

And a question, can MPD build up an index and play music stored on your Windows machine?
Yes, in the Playback interface, "Library" tab, "Albums" and "Artists" are now populated from the [My Music] shared folder on my Windows 10 machine and I have the options to add. add & play, and add, replace & play

But I'm afraid I don't know how I should transition out of the PuTTY/cli ecosystem and back into the familiar gui one. If i just exit the PuTTY cli does everything automatically revert to gui "business as usual", or are there any things I still need to configure first - either in the cli or the gui interface?

I apologise for being so clueless, and I really appreciate your patience :)

EDIT
The 'Local Sources' gui is still showing a red 'X' against my remote directory file-path in the 'Local Sources' gui.

EDIT#2
It's not now :D My question was unnecessary.
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby fuddyduddy » 28 Mar 2019, 10:33

@ janui
I'd like to express my warm appreciation for all your help: it feels a bit like having had a prison sentence commuted (or rather what I imagine that would feel like)!
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby janui » 29 Mar 2019, 15:54

Hi fuddyduddy,
What I propose is modify a system file which will mount your Windows share at boot time. RuneAudio will know nothing about the mount so the Sources UI will not list it. MPD will see the mount and index any music files on it. If MPD can only see a part of your music collection, please report it, there is a solution for this. This solution has the limitation that only one Windows share or NAS can be added. Again there is a solution for this, please report it if you need it. I am trying to keep it as simple as possible.
The system file which you are going to modify is /etc/fstab. So lets make a copy of it in case we screw up:
Code: Select all
cp /etc/fstab /home/fstab
To start again you need to copy it back with these commands:
Code: Select all
cp /home/fstab /etc/fstab
chmod 644 /etc/fstab
With this next command you can add a line to /etc/fstab which should mount your Windows share:
Code: Select all
echo //192.168.1.102/My\040Music /mnt/MPD/NAS cifs ro,vers=3.0,cache=none,username=rober,password=secret 0 0 >> /etc/fstab
Note, this is one line, even though it looks like two, you must execute it as one line! You will also need to modify the command line to correct your username and password BEFORE executing it. After running it check the results with:
Code: Select all
grep -i cifs /etc/fstab
The output should look very similar to the command which you used to mount the share.
Then reboot.
Check that the mount is successful with the command:
Code: Select all
grep -i cifs /proc/mounts
You should see a line similar to the one we added to /etc/fstab
janui
User avatar
janui
 
Posts: 624
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: NAS network mount

Postby fuddyduddy » 29 Mar 2019, 18:02

Hi janui

I went through that process, rebooted, and got
Code: Select all
[root@runeaudio ~]# grep -i cifs /proc/mounts
//192.168.1.102/My\040Music/ /mnt/MPD/NAS/music cifs rw,relatime,vers=2.0,sec=ntlmssp,cache=strict,username=rober,domain=DESKTOP8,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.102,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=16384,wsize=17408,actimeo=1 0 0
which - I guess - fulfills your expectations:-
You should see a line similar to the one we added to /etc/fstab
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby janui » 29 Mar 2019, 18:42

Hi fuddyduddy,
If it works, fine. But you seem to have done something unexpected. In the line which you posted the I would have expected the 'rw' to be 'ro', 'cache=strict' to be 'cache=none' and 'vers=2.0' to be 'vers=3.0'. Not sure what is going on here. You could try unmounting the share and rebooting:
Code: Select all
umount -aft cifs
/srv/http/command/rune_shutdown
reboot
If you then get the same output from 'grep -i cifs /proc/mounts' could you post the output of this command:
Code: Select all
grep -i cifs /etc/fstab
janui
User avatar
janui
 
Posts: 624
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: NAS network mount

Postby fuddyduddy » 29 Mar 2019, 19:43

Hi janui

The output was identical.

Here's the output from the final command
Code: Select all
[root@runeaudio ~]# grep -i cifs /etc/fstab
//192.168.1.102/My040Music /mnt/MPD/NAS cifs ro,vers=3.0,cache=none,username=rober,password=secret 0 0
//192.168.1.102/My040Music /mnt/MPD/NAS cifs ro,vers=3.0,cache=none,username=rober,password=zzzzzzzz 0 0
I notice that it's duplicated. MIght this perhaps have resulted from a glitch introduced by my having (first time around) entered the command twice, once incorrectly (it had "password=secret" instead of my actual password) and then again corrected? (sorry about that).

Edited: removed password from second output
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby fuddyduddy » 01 Apr 2019, 14:18

Hi janui
janui wrote:What I propose is modify a system file which will mount your Windows share at boot time. RuneAudio will know nothing about the mount so the Sources UI will not list it. MPD will see the mount and index any music files on it. If MPD can only see a part of your music collection, please report it, there is a solution for this. This solution has the limitation that only one Windows share or NAS can be added. Again there is a solution for this, please report it if you need it. I am trying to keep it as simple as possible.janui


I'm a bit confused as to where we've arrived at.

At present, the Rune 'Sources' UI is continuing to list this mount as before and to see all of my collection. Does that mean that my clumsiness has caused you to give up this idea? Or are you perhaps awaiting some more feedback from me?

For what it's worth, my belief is that being limited to only one Windows share wouldn't be a problem for me. My music collection (such as it is) is currently all contained in my Windows 'My Music' folder and I have no plans to change that (only to add to it).
fuddyduddy
 
Posts: 38
Joined: 19 Feb 2016, 12:55
Location: Åland Islands

Re: NAS network mount

Postby janui » 01 Apr 2019, 15:21

Hi fuddyduddy,
Sorry for the delay, been busy.

In the Sources UI you must delete all the mounts which you previously attempted to create. First click on the mount then click on ‘remove this mount’.
Edit the file /etc/fstab and remove the duplicate incorrect line. There must only be one line per mount, the one with the correct passwords should be the correct one..

If you think you have damaged the /etc/fstab file you should be able to start again as explained here: nas-network-mount-t789-30.html#p27602

janui
User avatar
janui
 
Posts: 624
Joined: 20 Dec 2014, 12:55
Location: Ollanda

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 16 guests