Network Mounts

Raspberry Pi related support

Network Mounts

Postby rlsten » 25 Feb 2017, 19:21

Can anyone tell me in what folder/file in Rune on an Raspberry Pi 3 the information regarding Network Mounts is stored in? I don't mean the mnt/MPD/NAS folder, I mean where is the information stored that tells Rune to mount the NAS source in the mnt/MPD/NAS folder?

Thanks,
Rod
rlsten
 
Posts: 118
Joined: 25 May 2015, 18:06

Re: Network Mounts

Postby hondagx35 » 25 Feb 2017, 21:22

Hi Rod,

it is hard coded in "runeaudio.php"
https://github.com/RuneAudio/RuneUI/blo ... .php#L2396

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Network Mounts

Postby rlsten » 25 Feb 2017, 22:37

Frank,

Thanks for your reply. What am I looking for is once you click "Save Mount" on the "NAS Mount Add new network mount" page, where is that information stored? Is it in a file? Forgive me if my ignorance of programming is showing.

Rod
rlsten
 
Posts: 118
Joined: 25 May 2015, 18:06

Re: Network Mounts

Postby hondagx35 » 25 Feb 2017, 23:55

Hi Rod,

your question was:
I mean where is the information stored that tells Rune to mount the NAS source in the mnt/MPD/NAS folder?


I think you would like to know where the mount options are stored, right?
All mount options are stored in our database.
Each source has its own database entry.
They can be accessed on the console:
Code: Select all
root@runeaudio(rw):~# redis-cli keys mount_*
1) "mount_1"
root@runeaudio(rw):~# redis-cli hgetall mount_1
 1) "name"
 2) "Musik"
 3) "id"
 4) "1"
 5) "type"
 6) "cifs"
 7) "address"
 8) "192.168.0.106"
 9) "remotedir"
10) "Musik"
11) "username"
12) "xxxxxx"
13) "password"
14) "xxxxxxxx"
15) "charset"
16) "utf8"
17) "rsize"
18) "16384"
19) "wsize"
20) "17408"
21) "options"
22) "cache=none,noserverino,ro"
23) "error"
24) ""


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Network Mounts

Postby rlsten » 26 Feb 2017, 01:04

Yes, that is what I was looking for.

Is it possible to add a network mount to the database manually?

The reason I am asking all this, is I am experimenting with several Rune distributions on a number of platforms, and I would like to use the same mpd.db on each of these setups. My music database is very large: it has several SDs and a very large network mount. By using Local Storage and fstab I have no problem maintaining the SD cards without having to rescan them each time I use them on a different platform. But if I add a network mount the normal way through the Rune web interface, then Rune will rescan the entire database, and if the SD cards are not attached to that particular device, then the data from those cards are lost.

So if I could make Rune believe I have a network mount without Rune rescanning the database, I can just move mpd.db to any new platform and have my whole database available, at least in the library.

I hope this makes sense.

Rod
rlsten
 
Posts: 118
Joined: 25 May 2015, 18:06

Re: Network Mounts

Postby rlsten » 26 Feb 2017, 15:24

I had another thought about this issue. Is it possible to stop Rune from automatically updating the music database when a network mount is added?

Rod
rlsten
 
Posts: 118
Joined: 25 May 2015, 18:06

Re: Network Mounts

Postby hondagx35 » 26 Feb 2017, 17:56

Hi Rod,

you can try to modify this file:
from
Code: Select all
                case 'sourcecfg':
                    runelog('wrk_SY: ', $job->wrkcmd);
                    $redis->sAdd('w_lock', $jobID);
                    if (wrk_sourcecfg($redis, $job->action,$job->args)) sysCmd('mpc update');
                    $redis->sRem('w_lock', $jobID);
                    break;

to
Code: Select all
                case 'sourcecfg':
                    runelog('wrk_SY: ', $job->wrkcmd);
                    $redis->sAdd('w_lock', $jobID);
                    #if (wrk_sourcecfg($redis, $job->action,$job->args)) sysCmd('mpc update');
                    wrk_sourcecfg($redis, $job->action,$job->args);
                    $redis->sRem('w_lock', $jobID);
                    break;


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Network Mounts

Postby rlsten » 26 Feb 2017, 21:20

Thanks very much, Frank.

I was able to add a network mount without updating the database, but unfortunately there was no entry for that mount in the Library. This made me realize that my problem is with mpd.db, not the Rune databases.

I am sorry to keep bothering you with this. I now realize what it is I think I am trying to achieve, and I realize that is may not be possible.

What I would like is for whatever mounts I have, whether LocalStorage or NAS, to be persistent in the mpd.db and consequently in the Rune Library whether or not those particular mounts are physically present at any given time that I am using Rune. I also would like to add a mount to the mpd database, without rescanning the entire database when I do that. In other words, if I have 3 SD cards that have been cataloged in mpd.db, and I want to add a new SD card, I want to be able to add that card without rescanning the whole database. The reason for this is that I may not be able to physically connect 4 SDs to Rune at the same time, and I would like to avoid having to rescan all 4 SDs when I am only adding one.

The same would be true for networks mounts.

So, what I guess I am looking for, is there a way to create a top level entry in the mpd.db for an SD card, or a network mount, that would identify it properly as far as its location in the system, but would not cause the mpd library to be rebuilt. In other words, when I click on Local Storage in the Library tab of the Rune interface, I would see a top level entry for all 4 SDs, even though one of those would have no content. I would then be able to update the new SD by clicking on update this folder in the menu on the right side.

Again, I'm sorry for bothering you with this.

Rod
rlsten
 
Posts: 118
Joined: 25 May 2015, 18:06

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 5 guests