FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Setup Issues › Running Two Copies of Firefly on a Single NSLU2
- This topic has 24 replies, 8 voices, and was last updated 16 years, 7 months ago by Anonymous.
-
AuthorPosts
-
03/06/2006 at 5:43 PM #322SherlockGuest
There was some discussion in the ‘General Discussion’ thread
http://forums.fireflymediaserver.org/viewtopic.php?t=4683
about ‘removing’ a drive without removing the song information from that drive from the database. After thinking about my own requirements, I decided it would be more useful for me to actually be able to run two copies of Firefly, each with their own database of music. Since I was not sure if it was technically possible, I asked and Ron replied:
@rpedde wrote:Technically, yes. You’d need to make two config files, with two different db_parms (directories), different ports, different names, and different mp3_dirs. You could share admin-roots.
Should work fine.
— Ron
I decided to start a new topic in the ‘Setup Issues’ thread for this specific subject. This will make it easier for anyone else interested in doing this to find this thread.
Since I am not a Linux person, I undoubtedly will not be able to do this without help. That is the other reason I am posting this; in the hope that someone with more Linux skills may also be interested in doing this. So if anyone else has an interest in this, let me know.
08/11/2006 at 10:05 PM #4882SherlockGuestWith all the stores decked out for Christmas, I decided it was time to get all my Christmas music on my NSLU2 and see about running two copies of Firefly; one for our regular music and one strictly for Christmas Music. I setup a new folder on the NSLU2’s disk called ‘xmasmp3’ and created a new config file called ‘xmas-daapd.conf’ as shown below.
web_root /opt/share/mt-daapd/admin-root
port 3690
admin_pw mt-daapd
db_dir /opt/var/xt-daapd
mp3_dir /share/flash/data/public/xmasmp3
servername XMAS Music
runas guest
playlist /opt/etc/mt-daapd/xt-daapd.playlist
extensions .mp3,.m4a,.m4p
#logfile = /var/log/mt-daapd.log
rescan_interval 600
always_scan 0I then enter the following via telenet to start the second copy of Firefly:
/opt/sbin/mt-daapd -c /opt/etc/mt-daapd/xmas-daapd.conf
When I turn on my Soundbridge, I can now select which music library I want to listen to; either our regular library or our Christmas library.
Since I am a Linux newbie, I would appreciate a post if anyone spots a problem with what I have done. Otherwise, I have documented what I did for anyone else that may find this useful.
09/11/2006 at 3:11 AM #4883rpeddeParticipant@Sherlock wrote:
Since I am a Linux newbie, I would appreciate a post if anyone spots a problem with what I have done. Otherwise, I have documented what I did for anyone else that may find this useful.
That looks great. Glad it works. Thanks for the feedback.
— Ron
09/11/2006 at 5:29 AM #4884SherlockGuest@rpedde wrote:
That looks great. Glad it works. Thanks for the feedback. — Ron
And thanks to you, Ron, for such a great package. I hope to be able to move to a nightly, but my lack of Linux knowledge keeps holding me back. In the meantime, my wife and I are enjoying listening more to our music. Being able to listen to what we want wherever we are in the house is really great.
17/12/2006 at 8:44 PM #4885RickVParticipantI’m also thinking of splitting up my music library.
Ron said:
Technically, yes. You’d need to make two config files, with two different db_parms (directories), different ports, different names, and different mp3_dirs. You could share admin-roots.
Should work fine.
— Ron
Sherlock showed his second config-file:
web_root /opt/share/mt-daapd/admin-root
port 3690
admin_pw mt-daapd
db_dir /opt/var/xt-daapd
mp3_dir /share/flash/data/public/xmasmp3
servername XMAS Music
runas guest
playlist /opt/etc/mt-daapd/xt-daapd.playlist
extensions .mp3,.m4a,.m4p
#logfile = /var/log/mt-daapd.log
rescan_interval 600
always_scan 0Unfortunately the config-file shows more than just the settings which are different according to the other config-file.
Am I right and are the following settings the settings that makes the difference:
web-root
port
db-dir
mp3-dir
servernamePlease can someone confirm and also tell me some more about the port to be used. How can I determine wich port is free?
Also can someone tell me more about the web-root? Will this be the web-page for the second firefly instance? [/quote]17/12/2006 at 8:55 PM #4886rpeddeParticipantweb-root
port
db-dir
mp3-dir
servernameCopy your mt-daapd.conf to mt-daapd2.conf.
edit mt-daapd2.conf, and change the following values:
general/port (to anything different, but between 1024 – 65535. I use 9999. No reason, just do.)
general/db_parms (I’d change it to /opt/var/mt-daapd2)
general/mp3_dir (to wherever your other music is)
general/servername (to whatever you want it named).
Then do “mkdir /opt/var/mt-daapd2” (or whatever dir you used), and “chown nobody /opt/var/mt-daapd2”.
Then go ahead and run it: “/opt/sbin/mt-daapd -c /opt/etc/mt-daapd2.conf”
Wait for it to index, and see how it works.
Check your syslog if you see any problems.
And yes, the web-root is the base of the web pages for the web admin — those can be the same for both instances.
23/12/2006 at 2:05 PM #4887RickVParticipantRon,
Thank you for the detailed description. I managed to install a second instance.
With this second instance I wanted to serve a MP3 directory containing 13161 songs with lots of artists. In fact this are all the songs that were in the Dutch Top40 Charts from 1968 up till now. The directory is almost 60Gb, so approximately 5 Mb per song.
When browsing-by-artist this MP3-directory I again got the message “browse failed”. Then I reduced the number of songs, for testing, to 10 songs and then it works fine.
It looks like there has to be a limit which is exceeded.
My other music-library contains at this moment 10101 songs. This directory is 82 Gb, almost 9 Mb per song.Is it possible to add another firefly instance serving a third library? What will be the drawback apart from searching for a specific song.
I use a wired connection with a Linksys WRT54G router.
23/12/2006 at 4:43 PM #4888fizzeParticipantis your NSLU2 de-underclocked? or is it a recent buy, so it already runs at 266Mhz?
the de-underclocking has a tremendous performance impact.
Other than that, sure, you can run as much firefly instances as you want. Just repeat the steps for each instance. but be aware that the nslu2 has a limited amount of memory. I’d estimate more than probably 4 instances wouldnt work at all.
23/12/2006 at 5:50 PM #4889masParticipantIf memory is the limiting factor the de-underclocking wont help. In this case he needs to fatten his slug (nasty work) or remove as many as possible running threads from the memory.
De-underclocking will help if timeout due to excessive cpu load is the reason. Watching memory and cpu consumption while acessing the device may help to give an answer here. But IMHO (and at least for a de-undeclocked slug) the memory is often far more the limitation than CPU.
24/12/2006 at 1:08 AM #4890rpeddeParticipant@RickV wrote:
When browsing-by-artist this MP3-directory I again got the message “browse failed”. Then I reduced the number of songs, for testing, to 10 songs and then it works fine.
It looks like there has to be a limit which is exceeded.
My other music-library contains at this moment 10101 songs. This directory is 82 Gb, almost 9 Mb per song.Probably timeout on waiting for browse data. You can try making an index on artist on the database — that should probably work.
Try this:
foo@slug:~$ cd /opt/var/mt-daapd
foo@slug:/opt/var/mt-daapd$ sqlite songs.db
sqlite> create index idx_artist on songs(artist);
sqlite> .quit
You’ll have to do that as root, probably, and then chown everything back to guest.
See what that does.
— Ron
-
AuthorPosts
- The forum ‘Setup Issues’ is closed to new topics and replies.