Running Two Copies of Firefly on a Single NSLU2

FireFly Media Server Firefly Media Server Forums Firefly Media Server Setup Issues Running Two Copies of Firefly on a Single NSLU2

Viewing 10 posts - 1 through 10 (of 25 total)
  • Author
    Posts
  • #322
    Sherlock
    Guest

    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.

    #4882
    Sherlock
    Guest

    With 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 0

    I 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.

    #4883
    rpedde
    Participant

    @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

    #4884
    Sherlock
    Guest

    @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.

    #4885
    RickV
    Participant

    I’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 0

    Unfortunately 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
    servername

    Please 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]

    #4886
    rpedde
    Participant

    web-root
    port
    db-dir
    mp3-dir
    servername

    Copy 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.

    #4887
    RickV
    Participant

    Ron,

    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.

    #4888
    fizze
    Participant

    is 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.

    #4889
    mas
    Participant

    If 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.

    #4890
    rpedde
    Participant

    @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

Viewing 10 posts - 1 through 10 (of 25 total)
  • The forum ‘Setup Issues’ is closed to new topics and replies.