Installation on Linux - NFS music mounted readonly

Linux related discussion about netjukebox
Locked
swests
User
Posts: 6
Joined: Fri Feb 12, 2010 6:02 pm

Installation on Linux - NFS music mounted readonly

Post by swests »

Hi there

Thought I'd give netjukebox a quick go but have hit a small issue.

Setup
netjukebox host : Ubuntu
media : mounted from NFS share off another Ubuntu server - NFS share mounted read-only

Get the mysql, etc stuff sorted all ok but the library won't update - I got the following message:

Code: Select all

Can't write file:
/srv/mp3/iTunes Music/ZZ Top/Eliminator/d2jzdf30qo.id

    * Check file/directory permission
(Yes I know ZZ Top - no comments please :))
I'm guessing that this is because netjukebox is trying to write to a read-only mount.

So, my questions are
- what is it trying to write?
- can I force these files elsewhere?
- am I stuffed?

I'm going to dig through the code but guess this may be quicker!

Thanks in advance!
swests
User
Posts: 6
Joined: Fri Feb 12, 2010 6:02 pm

Re: Installation on Linux - NFS music mounted readonly

Post by swests »

Ok - update...

Can't see why there is a need to write to the source directory so I've commented out lines 1052 and 1053 in update.php.

Code: Select all

if (file_put_contents($dir . $album_id . '.id', '') === false)
		message(__FILE__, __LINE__, 'error', '[b]Can\'t write file:[/b][br]' . $dir . $album_id . '.id[list][*]Check file/directory permission[/list]');
The update is running now (on my whole library - I forgot to alter the config for a subset!) and i'm sure may trip up at some other point, but so far so good.

Scanning the code I suspect it will fail in the image management code, but lets see...
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Installation on Linux - NFS music mounted readonly

Post by wbartels »

- what is it trying to write?
It is trying to write an empty file
- can I force these files elsewhere?
No, because it writes a unique id to recognize an album even when renaming a directory. So the netjukebox statistics will still work after renaming an directory. Also the play, stream, download etc command will still be the same after renaming a directory.

PS
The files will be recognized by the same id in combination with a very short hash of that file.
swests
User
Posts: 6
Joined: Fri Feb 12, 2010 6:02 pm

Re: Installation on Linux - NFS music mounted readonly

Post by swests »

wbartels wrote:It is trying to write an empty file
Ok.
wbartels wrote:
- can I force these files elsewhere?
No, because it writes a unique id to recognize an album even when renaming a directory. So the netjukebox statistics will still work after renaming an directory. Also the play, stream, download etc command will still be the same after renaming a directory.

PS
The files will be recognized by the same id in combination with a very short hash of that file.
So, by making the changes I have, I don't get these id files, but that's only a problem if directories get moves around. That's not an issue with my setup. Lots of other apps reference the files, so changing or moving directories would cause a real issue...
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Installation on Linux - NFS music mounted readonly

Post by wbartels »

swests wrote:So, by making the changes I have, I don't get these id files, but that's only a problem if directories get moves around. That's not an issue with my setup. Lots of other apps reference the files, so changing or moving directories would cause a real issue...
Almost everything is based on the id.
So don't delete the id creation part of the code!
For example these thing don't work properly without the id:
  • Transcode cache
  • Favorites
  • Statistics
  • Share album
swests
User
Posts: 6
Joined: Fri Feb 12, 2010 6:02 pm

Re: Installation on Linux - NFS music mounted readonly

Post by swests »

ah! erm.... ok then.
idh2012
User
Posts: 1
Joined: Mon May 21, 2012 12:25 am

Re: Installation on Linux - NFS music mounted readonly

Post by idh2012 »

Just registered to say this need to write to my music repository is a no go situation.

Netjukebox might have been good but I'm going elsewhere.

First and final post.
drewsky
User
Posts: 1
Joined: Sat Jul 21, 2012 3:07 pm

Re: Installation on Linux - NFS music mounted readonly

Post by drewsky »

New to netjukebox, and immediately after installing it for the first time, I stumbled into this same situation, and like the OP, I too think this is a deal-breaker. Too bad... I hope that the dev team will re-think this approach in the future.

ETA: I meant the poster before me, not the OP.
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Installation on Linux - NFS music mounted readonly

Post by wbartels »

Sorry, read only is not going to happen!
See: viewtopic.php?f=11&t=507#p1760
Locked