MiniDLNA rescan every startup

  • I've go a little problem with my new installed stable version of minidlna. Almost everything works perfectly except of a full rescan on every server wakeup. It seems like it looses the database and does a rescan as a result of that, because I cannot access the server files before the rescan is done. Any idea what might cause that problem? Openmediavault is installed on a N54L micoserver with everything up to date. Thanks.

    • Offizieller Beitrag

    What's the output of:


    cat /etc/minidlna.conf | grep db_dir

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • If I do that in putty, I get db_dir=/var/cache/minidlna
    Sorry but I'm actually totally new to linux - so I'm not sure if it was correct using this command in putty?

  • Sure, you can use 99% of commands inside PuTTY. The only exception i can think of, would be commands related to the XServer (if installed and used).


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

    • Offizieller Beitrag

    The database is in the correct location. I have a feeling that minidlna is faulting when it is searching which makes it rescan when you reboot. minidlna can be picky about files especially bluray rips.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • For what it's worth. miniDLNA has always rescanned my OMV system at every boot. I just thought it was natural and supposed to. Didn't matter if there were 2 files or 7000. This is also my third machine with OMV and miniDLNA. Rescans at boot seem to be normal - at least to me.

  • I had minidlna on a synology diskstation before, and i think it didn't make a rescan on every startup. At least it might have done a rescan to renew the database, but all the files were accessable immediately after boot. Now minidlna seems to rebuild the database and I have to wait about 10 minutes to get file access. That shouldn't be normal in my opinion?

    • Offizieller Beitrag
    Zitat von "DaveVM"

    For what it's worth. miniDLNA has always rescanned my OMV system at every boot. I just thought it was natural and supposed to. Didn't matter if there were 2 files or 7000. This is also my third machine with OMV and miniDLNA. Rescans at boot seem to be normal - at least to me.


    Looking at my logs, it looks like it does for me as well.


    I never really paid any attention, but to me, this seems normal (note, I've got.... probably 150-200 videos being served by DLNA, and even when I do a manual scan, it only takes a few seconds. So I'm not real sure what the issue is here.

  • I have over 7000 files in my miniDLNA shared area. And looking at my logs it takes about three minutes for miniDLNA to create a new database. Though I would think the database creation speed is based on the number of files and type of CPU.


    I think it would be nice if miniDLNA would use it's created database when booting and update it after boot in the background. Though from what I have read here on the forums the miniDLNA devs are satisfied with the operation of miniDLNA. Since miniDLNA is a plugin to OMV it is a separate app developed by others who are not part of the OMV team.

    • Offizieller Beitrag

    This is an interesting thread about minidlna even though it is dealing with a router. Basically, it says minidlna has to rescan your collection on reboot/restart to make sure all of the files are there and find any changes.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Whats the output of this command:

    Code
    ls -lh /var/cache/minidlna/files.db


    the output should be

    Zitat

    -rw-r--r-- 1 minidlna minidlna 2,1M Jun 17 15:40 /var/cache/minidlna/files.db


    Where do you guys see that minidlna is rescanning your whole media after a reboot.
    I often reboot my omv and i don't see minidlna rescanning my media in my logs.

  • There is the problem. As far as i know /tmp is cleared after a reboot, that is why the files.db missing and must be recreated.
    But "Bigf" wrote that it is in the same locating as mine so his problem is maybe a permission issue.

  • Most packages have the /var/cache location as the default if you take off the hash. The minidlna config file is located at /etc/minidlna.conf.


    I run my server 24/7. The /tmp location is not a big deal for me.

  • I only wrote that about tmp, because you said "many" people are using it on tmp and that is one of the problems those might have.
    Also minidlna is using /var/cache/minidlna/ by default if not changed manually in minidlna.conf which is not even changeable through WebGUI.

  • I haven't looked at the init script. When you manually start or restart minidlna you can put -R in the command. So the rescan may be contained in the init script. This is not an error if there is a rescan. It is a preference issue. In the plugin/package I have currently the /var/cache was hashed out, so /tmp was default. The prior plugin had /var/cache as default and the one before that was /tmp. No matter, the general user should not alter the init script and I would not classify the rescan at boot as a problem. If someone's scan is taking a long time, or crashes/corrupts the db file, they should be looking at file types they are using and perhaps minidlna is not best solution for them. Minidlna does not play well with many file types.

    • Offizieller Beitrag

    Just to answer everyone's questions...


    There is no -R in the init script.


    minidlna does rescan the directories in which any file in the database is located *every* time you start it (not just reboots). If there are no new files or very few directories in your database, it is very fast. If you want to see exactly what it is doing, do the following:


    /etc/init.d/minidlna stop
    minidlna -d -f /etc/minidlna.conf


    This will run minidlna in non-daemon mode showing all debug output. If it is going too fast, save the output to a file


    minidlna -d -f /etc/minidlna.conf > log


    I just tried this versions 1.0.25 and 1.1.0. By the way, 1.1.0 scans quite a bit slower and minidlna is now known as ReadyMedia.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • br41n


    Zitat

    Where do you guys see that minidlna is rescanning your whole media after a reboot.
    I often reboot my omv and i don't see minidlna rescanning my media in my logs.


    I see it in the DLNA log file as;

    Code
    [2013/06/17 15:09:27]	playlist	Parsing playlists...
    [2013/06/17 15:09:27]	scanner	 Scanning /media/1a2345cd-ef67-8ab9-01c2-de345f678901/folder finished (7216 files)!
    [2013/06/17 15:06:26]	minidlna	HTTP listening on port 8200
    [2013/06/17 15:06:26]	scanner	 Scanning /media/1a2345cd-ef67-8ab9-01c2-de345f678901/folder
    [2013/06/17 15:06:26]	minidlna	Creating new database...
    [2013/06/17 15:06:25]	minidlna	Starting MiniDLNA version 1.0.25 [SQLite 3.7.3].


    and as ryecoarron stated also after a miniDLNA restart as well.


    miniDLNA only scans the directories set up as for miniDLNA to share. (share may not be the correct word, but it is the best I could come up with)

  • I always realized the rescan because I could't access my music files immediately, every time I just wanted to listen to music. The main problem probably was the incredible picture "mess" :lol: of my wife - about a 40000 files total jpeg chaos. I deleted the scan directory and told her to clean it. With my own files the rescan is done in a few seconds. So I really can recommend - you better don't give your wife(s) any server access...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!