Volumio rescans music library everytime on reboot

Can someone tell me, why Volumio rescans the entire Music library everytime it restarts. This is happening on a fresh install of the most latest version, as well as previous versions. My music is on a USB hard drive attached to Volumio, formatted to exfat.

I would really appreciate if someone can point me to how this can be prevented, or whether this is the expected behavior? Its taking half an hour each time.

Thank you.

Hi,

Iā€™m not sure 100%, let me correct someone who knows more about this ā€¦
On boot up, linux is running ā€œinotifyā€ for checking directory changes. For this time MPD is ā€œhanging upā€. You cannot play music from your library, and cannot run internet radios. Music library is empty, and if you open ā€œMy Musicā€, some kind of MPD restart happen - donā€™t do it ! But Spotify can work. This is not a valid music library scan. So, Iā€™m leaving alone my volumio on boot for half or one hour - in ā€œdo not touch until music library gets availableā€ state ā€¦
I have no idea how to avoid this ā€œhang upsā€ ā€¦

Regards,
totyc

Your description of the issue is spot on. This is exactly what I am experiencing (and feels better to know that its not something I did). I am worried that more the music library grows, longer it will take to finish the directory scan. I just read in these forums, someone with a huge library has to wait 16 hours for the update to finish. What I would ideally like Volumio to do is (assuming the updating is unavoidable), perform the directory update in the background while I am listening to music. I am wondering if such plans are there in a future update.

No, this is not normal behaviour. I frequently restart a RPi connected to a NAS without it rescanning. Have you tried streaming from a networked device rather than the USB drive, to rule out it being a problem with the latter? You could also upload the log after rebooting & it starts scanning to see if there are any obvious error messages. Post the link here if you do so.

I hava all my music on NAS, if the NAS is off, there is no wait on startup, but there is no music library ā€¦ :slight_smile:

Tapatalkkal kĆ¼ldve az Ć©n PLK-L01 eszkƶzƶmről

Thanks for pitching in. Here are the logs, just after restarting and having finished the scan of the music directories.

logs.volumio.org/volumio/g0WpbQR.html

I donā€™t have access to a networked device at the moment though.

I was wondering if someone looked at the logs that I posted and found something that explains the cause of the repeated rescanning. I have tried to scroll through the logs myself, but wasnā€™t anywhere.

Recently I notice that every time I run fsck on the USB drive, it says, ā€œWARN: volume was not unmounted cleanlyā€, even after connecting the drive to a mac laptop and running first aid through Disk Utility. Could that be a clue to the rescan problem?

fsck from util-linux 2.25.2
exfatfsck 1.1.0
WARN: volume was not unmounted cleanly.
Checking file system on /dev/sda1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 1863 GB
Used space 581 GB
Available space 1282 GB
ERROR: cluster 0x335da3 of file ā€˜Cover.jpgā€™ is not allocated.
ERROR: empty file marked as contiguous (0x3).
ERROR: empty file marked as contiguous (0x3).
Totally 62629 directories and 418327 files.
File system checking finished. ERRORS FOUND: 3.

Nothing obvious in logs. I would try a new flashed installation on a different sd card, and if you still have the problem, then consider raising the issue on Github.

Thanks. I have posted it on github. A few further notes. The rescan does not happen only on system restart, but each time mpd is restarted. For example, if I change a setting and hit save. Also, the scanning does not repopulate the music database, because any changes made to music directories are not visible after the long ā€˜scanningā€™ finishes. They are only visible after I manually hit the update button. Also, during the scan, mount.exfat process takes up 46% of cpu. I am attaching my post in github here.

Hi,

If volumio is connected to the network by Ethernet cable, ā€œrescanā€ happens always if MPD has some changes ( on restart, on changing output device ā€¦), but
if volumio is connected to network by WiFi, i can play music stored on NAS immediately after start / restart. There is no ā€œscanā€ ā€¦
I think this can be explanation to that someone have issue with ā€œrescanā€ someone not ā€¦

(I use volumio on odroid C2)

Hmmmā€¦ interesting. Mine is a USB drive, and it rescans every time.

So does mine. Stick or drive, wifi or ethernet.

One question, is your drive formatted with exfat?

donno. standard 4 gb stick and standard 500 gb drive.

Simple reinstall, and problem gone ā€¦ ( + one day in waste ā€¦)

For me the same problem still remainā€¦
Have you suggest?

Hi, is anybody here, who found the solution? I have tried to reinstall Volumio, but nothing change. Volumio scans after every reboot or every unmounting the HDD. It is formated as Mac OS Journaled. Thanks for any kind of help.

Tomas

Hello,

I have the same problem.
Iā€™m running on raspbac i-sabre v3 made by Audiophonics with the latest version of Volumio (2.547).
My music library is stored in a external hard disk (4 To), with approximately 100 000 songs (huge yesā€¦), connected with usb

When I reboot volumio, it rescan automatically my library. And the indexation take a lot of time:

  • A first ā€œphaseā€ of indexation, in 5 minutes with 13 000 songs
  • A second ā€œphaseā€, which took 2-3 weeks to reach 100 000 songs.

So the rescan is very problematic for me.

Any idea why Volumio scan the entire library after rebooting?

Regards,

Hi,

I re-up the message because I still can solve the problem; Volumio rescan the library, even if Iā€™m on wifi or ethernet.

Vincent

Up?