INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Moving to a NAS and adding a Linux Player + some other probably silly questions  (Read 9266 times)

Dewd

  • Recent member
  • *
  • Posts: 16

OK.  First let me start by saying that I have been using JRiver Media Centre for quite a few years now, but have only ever used it for my music library (about 40 000 tracks).  It has always just run on the PC in the study and then I had a line outs to different HiFi's to play when I wanted.  I'm no audiophile, but sometimes just want some background music.  As time went on, a few old parts failed and fell by the wayside (some replaced, some not) until I realised that the whole system was in quite a mess and needed a remake.

Now I'm quite (read very) fond of using what I have lying around, and I usually have more than 1 project on the go at any one time, so I decided to use a Raspberry Pi2  and two 2TB externally powered drives that I had spare and build a NAS as per this tutorial http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/  That is up and running now and I'm very happy with it.  I upgraded to MC21 moved the music I had left after a hard drive crash sometime ago (+-150GB - mostly MP3's) onto the NAS.  My laptop is loaded with the MC21 and reads the music folder on the NAS, populates the library, plays music, loads my iPod and all is good in the world.

Then out of the corner of my eye, I see that there is a Linux version of MC for Raspberry Pi's.  My mind goes to a solution to the outside entertainment area's sounds.  A separate Pi out there with and old PC monitor I have lying around since my son upgraded his PC at Xmas - also reading from the music library on the NAS sounds like a fantastic idea.  So, repurpose a Pi (not the one running the NAS of course) and load MC21 Linux as per the tutorial elsewhere on the board.  1 minor hiccup and Ka-Ching!  MC is working!  Now to point it to where the music is and get it to build it's library.  Problem.  MC won't see the NAS.  If I go to the File Manager on the Raspbian Wheezy GUI and navigate via Go > Network > etc, I can navigate to the music location no problem at all.

So my immediate questions are :-
1) Any idea why Media Centre won't see the NAS?
2) Have I gone about this all wrong?   
3) Is there a better way to do it using what I have at the moment

Logged

RussellS

  • Galactic Citizen
  • ****
  • Posts: 259

With regards to MC not seeing the NAS whereas the filemanager can, I would think that may be a security/permissions issue. If you first mount the NAS in Wheezy and then point MC to that mount does MC then import the music ok.

If that does then work you would need to set Wheezy up to automount the NAS on boot before launching MC. It's been a while since I've played with Wheezy so I can't remember how you set up automatic mount points.

Possibly a better way of running this would be to set up MC on the NAS Pi to run as an MC server and run the outside one purely as a client. Also, if this is purely for music then do away with the monitor on the outside Pi and control the system with a tablet/phone using JRemote. When you launch JRemote, you select the relevant MC server, select where you want the music to go (in this case the outside Pi) and select the music you want to play.

See my thread here https://yabb.jriver.com/interact/index.php?topic=97222.0 about my Pi music player build. Although I'm not running MC on it there is some good information from mwillems regarding running MC on the Pi and using it headless (ie, with no monitor).

Just a few ideas for you

Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Now to point it to where the music is and get it to build it's library.  Problem.  MC won't see the NAS.  If I go to the File Manager on the Raspbian Wheezy GUI and navigate via Go > Network > etc, I can navigate to the music location no problem at all.

The problem is either a lack of familiarity with how linux mounts filesystems or a permissions issue. When you say that MC "can't see" the NAS do you mean that you can't navigate to the mount point or there's nothing there once you get there?  Where are your NAS drives mounted on the Pi?  Typically when network drives are automounted by a filemanager in Linux they'll be in a subdirectory under the /run directory, or under the /mnt directory. 

On your client pi, after you've navigated to the NAS in the file manager (to make sure it's mounted), can you open a terminal and post the output of the following two commands:
Code: [Select]
df -h
lsblk

Those should list the drives the OS sees and where they're mounted.  Once you know where they're mounted, see if you can navigate to that spot in MC's import dialog.  If you can navigate to them and import files normally, then you just need to setup your network drives to automatically mount at boot in a predictable location.

For some tips on that check out this post and the three or so posts following it: https://yabb.jriver.com/interact/index.php?topic=99370.msg705297#msg705297.  It provides instructions for how to mount a samba share automatically at boot.  If you use a different share method (other than SMB/CIFS) let me know and I can offer some tips.

If it's a permissions issue we can handle that, but it's a more complicated question. 
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.3G  2.9G  3.1G  49% /
devtmpfs        459M     0  459M   0% /dev
tmpfs            93M  284K   93M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           186M     0  186M   0% /run/shm
/dev/mmcblk0p5   60M   20M   41M  33% /boot
pi@raspberrypi ~ $ ^C
pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0 813.3M  0 part
├─mmcblk0p2 179:2    0     1K  0 part
├─mmcblk0p3 179:3    0    32M  0 part
├─mmcblk0p5 179:5    0    60M  0 part /boot
└─mmcblk0p6 179:6    0   6.5G  0 part /
pi@raspberrypi ~ $

Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.3G  2.9G  3.1G  49% /
devtmpfs        459M     0  459M   0% /dev
tmpfs            93M  284K   93M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           186M     0  186M   0% /run/shm
/dev/mmcblk0p5   60M   20M   41M  33% /boot
pi@raspberrypi ~ $ ^C
pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0 813.3M  0 part
├─mmcblk0p2 179:2    0     1K  0 part
├─mmcblk0p3 179:3    0    32M  0 part
├─mmcblk0p5 179:5    0    60M  0 part /boot
└─mmcblk0p6 179:6    0   6.5G  0 part /
pi@raspberrypi ~ $

Those don't show the NAS as being mounted at all.  Are you sure you navigated to the NAS drive in the file manager before you ran those commands?
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

I was fiddling around today.

I was able to get the PiMC to play from the MCLibrary on my Laptop.  But MC was very slow and hung a few times.

I was able to navigate to the NAS through the File Manager (it does keep asking me for Username and Password - I'd like to fix that - I'm not worried about security on this stuff).  I was even able to make a shortcut on the desktop directly to the content of the NAS  This shortcut goes directly to the content and doesn't even ask for the username and password - possibly because it was put in when I navigated there to make the shortcut?

My Linux expert/drinking buddy/mate suggested that we try using the sshfs command to mount the NAS on a local directory.  We eventually got it to work, we thought, but the nas was not visible on the local directory, and MC still could not find it.

Logged

Dewd

  • Recent member
  • *
  • Posts: 16

Those don't show the NAS as being mounted at all.  Are you sure you navigated to the NAS drive in the file manager before you ran those commands?

Definately.
 
I'll do it again now and repost the results.
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

Last login: Sun Jan  3 22:23:37 2016 from 192.168.168.5
pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.3G  2.9G  3.1G  49% /
devtmpfs        459M     0  459M   0% /dev
tmpfs            93M  284K   93M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           186M     0  186M   0% /run/shm
/dev/mmcblk0p5   60M   20M   41M  33% /boot
pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0 813.3M  0 part
├─mmcblk0p2 179:2    0     1K  0 part
├─mmcblk0p3 179:3    0    32M  0 part
├─mmcblk0p5 179:5    0    60M  0 part /boot
└─mmcblk0p6 179:6    0   6.5G  0 part /


This was done on Putty from my laptop as it was easier to copy and paste the result.  I have the Music folder on the Nas open on the Pi in the file manager while I'm doing this.  I do see that the path to the Nas is smb://nasserver/Music     

Could this be something to do with Samba?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Last login: Sun Jan  3 22:23:37 2016 from 192.168.168.5
pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.3G  2.9G  3.1G  49% /
devtmpfs        459M     0  459M   0% /dev
tmpfs            93M  284K   93M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           186M     0  186M   0% /run/shm
/dev/mmcblk0p5   60M   20M   41M  33% /boot
pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0 813.3M  0 part
├─mmcblk0p2 179:2    0     1K  0 part
├─mmcblk0p3 179:3    0    32M  0 part
├─mmcblk0p5 179:5    0    60M  0 part /boot
└─mmcblk0p6 179:6    0   6.5G  0 part /


This was done on Putty from my laptop as it was easier to copy and paste the result.  I have the Music folder on the Nas open on the Pi in the file manager while I'm doing this.  I do see that the path to the Nas is smb://nasserver/Music     

Could this be something to do with Samba?


My samba shares show up as mounted in df, but it might be a session issue.  Can you try from a terminal on the GUi you have the filemanager open on?
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

Done.  Results were identical.  I'm just figuring an easy way to post them here.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

That's odd. Can you try deliberately mounting the samba shares at boot as described in my linked post above?  If that doesn't work it's definitely a permissions issue.
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

MAJOR PROGRESS TODAY!!!

I haven't had much time to look at this for a few days.  But my HiFi Berry Amp+ arrived this afternoon, so I had a re-look at the thing.  HiFi Berry have a tool on their website that builds a custom Raspbian image for you that includes the Amp+ settings.  I used this and then installed Media Center on that.  It worked first time!  Media Center sees the Nas and plays on the Amp+. 

Lots of happiness right here!

Des
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Weird.  But glad it worked out!
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

Weird.  But glad it worked out!

It seems I spoke too soon.

I left the system importing the  library.  This morning before we headed to the beach for my son's lifesaving training, I had a quick look and the library was imported and I quickly played a few tracks and tried a few things.  Media Center seemed a bit slow especially resizing windows and dragging and dropping songs.  I decided to turn off the Pi and have a look at it again when we got back.

This is where the problem started.  When I turned the Pi back on to check out my handiwork, it was not able to play any files from the library.  I've tried to delete and reinstall the library, but Media Center  keeps freezing.  I was able to navigate to the Nas Music folder through Media Center though.  While Media Center has frozen, other software on the Pi works fine.  

Any ideas where I can start looking for the problem?

Des
  
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Media Center seemed a bit slow especially resizing windows and dragging and dropping songs.  I decided to turn off the Pi and have a look at it again when we got back.

To some extent, this part is expected behavior.  The Pi is not particularly computationally robust, so any GUI intensive activity will be a bit slow, especially over VNC (if you're using a virtual interface still).  The best way to interact with a Pi instance of MC (once setup) is through an android or ios remote (like Gizmo or JRemote) which offloads some of the burden to the other device, and the next best is to use the Pi as a library client of an MC server on a more robust machine, and third best is to use the built in views to navigate rather than dragging and dropping.  

Window resizing in particular has been a bugaboo on JRiver for Linux in general (not limited to the pi) and can be a bit flaky.  One tip is to hold down the alt key while doing the resizing. To be clear, total freezing is not generally expected behavior, but slowness in the GUI is.

Quote
This is where the problem started.  When I turned the Pi back on to check out my handiwork, it was not able to play any files from the library.  

Can you post the error it throws?  Did you take steps to mount the NAS in a predictable location as suggested above?  My hypothesis is that the Music folder is being automounted by the OS in a way that doesn't produce a consistent mount point (analogous to the way windows handles removable media), so the database that MC built up now points to an old mountpoint that is no longer valid.  The easy fix there is to mount your shares at a predictable location on boot so that the MC database will always point to the same place.  That would also rule out some other potential issues.  

Quote
I've tried to delete and reinstall the library, but Media Center  keeps freezing.  

I'm not sure what exactly you mean by "delete and reinstall the library"; do you mean you're making a library backup and reimporting the library as a whole?  Or do you mean you're clearing the library and running an import to bring in the files?  Are you trying to delete the only library on the machine?  If so that might not work.  A better approach is to "clear" the library, or make a second one and then delete the original.

I'm also not sure exactly what you mean by "freezing"?  Does the whole UI lock up?  Does a blocking dialog box spawn and never go away? Does MC crash?  Or just hang?  

If you're getting stuck at the deletion or library creation phase there is a "sometimes" issue where the library manager will spawn dialogs requiring user input underneath the main window or windows that show progress.  So it looks as though MC is still frozen in process and the process never ends, when in fact there's a modal dialog box asking you to confirm something hidden under the progress box or main window.  If this is the issue you're seeing you can typically "find" the correct box by alt-tabbing or using another method of window switching to foreground the hidden modal dialog.  It's a longstanding bug that is less common than it used to be, but I still see it occasionally.

If you're seeing something else, please describe more specifically what exact steps you're taking (specific menu commands) and exactly what the results are and we can brainstorm.

Quote
I was able to navigate to the Nas Music folder through Media Center though.  

Can you explain how you mean?  Do you mean in the views?  In drives and devices?  In the import dialog?  One thing I've never been clear on is where your NAS is actually mounted in the file system; my guess is that MC doesn't know where it's mounted either which is a problem for a database-based player like MC. So it would be good to know where you're seeing it and how you're navigating to it.
Logged

Dewd

  • Recent member
  • *
  • Posts: 16

OK.  So I didn't let this die, I was just stocking up on beer so that I had a bargaining tool to get my "Linux Expert" around to help me.

Anyway, he arrived last night and we got stuck in, first of all getting him up to speed with my journey so far, and then MWillems suggestions above.

We started by making a backup image of the Pi that runs my NAS.  Then we Loaded MC21 onto it and got it running in headless mode, and reading the library.  Result!  Worked great! with MC21 running as Server on the NAS, I could easily play music on the Laptop.

Next step was to make a clean HiFiBerry Raspbian image on my other Pi that has the Amp+ fitted to it.  Done.  Installed MC21 onto that and got it to play as Client from the Media Server on the NAS.  Then made that HiFiBerry Pi run Headless with Gizmo.  All working like a BOMB!

I am very happy with the result. Running Gizmo on my old Samsung 10.1 tab to control the whole lot, I could not be happier.

Thanks to the guys here especially MWillems for the right advice, and I must say, having my mate help who actually understood what the steps he was doing were all about made a difference too.  Proof not to let a Civil Engineer near computer stuff.

Have just downloaded JRemote to test out and see which I prefer.

Des
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Aces!  Glad to hear it.
Logged
Pages: [1]   Go Up