Database disappears

Long time Volumio user. Upgraded to latest version yesterday. I also added more music to my 1TB USBHDD (Pi3+DAC). I did Rescan and Update (I was never clear what the difference was) and all was well. Shutdown normally. Today when I open Volumio it dispalys Jimmy Buffet Fins (the song I was listening to before the update) and when I check the library, none of the new music is there. If I run Update again, it is all good and everything plays fine. But when I turn off and back on again, I’m back ti Fins and the missing new songs. Run Update and all is fine, but I have to run Update on every single boot. It finds the new database, but doesn’t overwrite the old one??
Very annoying. Please help.

Hey @dmtparker

Please replicate your scenario and share debug log link:

Kind Regards,

http://logs.volumio.org/volumio/ujBr7ic.html
device id: f0aa433e4d70c7d48e739dce51ecf74d

Hey @dmtparker ,

Except the Jun 10 19:28:57 pime kernel: hwmon hwmon1: Undervoltage detected! which suggests that there is some power delivery shortcoming, nothing stands out.

Your Elements 1078 is a spindle based, will create power drain especially on startup. Still, it is unlikely that this is the issue you are facing.

Can you check using a ssh client the content of the mpd process log? The best if you could attach it to this thread.

sudo cat /var/log/mpd.log | grep -i fail
sudo cat /var/log/mpd.log | grep -i error
sudo cat /var/log/mpd.log | grep -i exception
sudo cat /var/log/mpd.log | grep -i warning

Kind Regards,

Not sure how to do that. I’m running Linux on my main computer. How do I get the ssh connection?
Thanks

Please follow instructions from here:

Kind Regards,

Got that done, but don’t know how to use ssh on my main computer to connect. I tried ssh http:///pime.local but that did not work. More help please and thank-you.

Hey @dmtparker,

Use command: ssh volumio@pime.local
Password: volumio

Kind Regards,

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Welcome to Volumio for Raspberry Pi (6.1.77-v7+ armv7l)
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for volumio:
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i error
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i exception
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i warning
volumio@pime:~$
No results from any of them!

Would the log only include current session? i.e. should I boot it up, rebuild the database and then run these commands or should the log include the last several sessions?

Hey @dmtparker,

The mpd.log is truncated on restart by design. The only way to capture the problem is to replicate after restart.

Kind Regards,

After doing Rescan:
Welcome to Volumio for Raspberry Pi (6.1.77-v7+ armv7l)
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail
[sudo] password for volumio:
Jun 15 11:20 : exception: Failed to open /var/lib/mpd/music/USB/Music/lost+found: Permission denied
Jun 15 11:20 : update: no read permissions on USB/Music/Bonnie Raitt/Slipstream/04 You Can’t Fail Me Now.flac
Jun 15 11:22 : exception: Failed to open ZIP file /var/lib/mpd/music/USB/Music/Woodstock/The Woodstock Festival/The Woodstock Festival CD1/Covers.zip
Jun 15 11:23 : update: no read permissions on USB/Music/The 5th Dimension/Up-Up and Away_ The Definitive Collection/1-11 Aquarius_Let the Sunshine In (The Flesh Failures).mp3
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i error
Jun 15 11:18 : update: updating USB/Music/Classical/Mozart/Operas/120 - KV 087 Mitridate, re di ponto - 1770 - 20 - Act II - Aria Farnace- Va, l’error mio palesa.flac
Jun 15 11:18 : update: updating USB/Music/Classical/Mozart/Operas/130 - KV 087 Mitridate, re di ponto - 1770 - 30 - Act II - Aria Farnace- Son reo- l’error confesso.flac
Jun 15 11:20 : update: no read permissions on USB/Music/Steppenwolf/The Second/09 Lost and Found by Trial and Error.flac
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i exception
Jun 15 11:20 : exception: Failed to open /var/lib/mpd/music/USB/Music/lost+found: Permission denied
Jun 15 11:22 : exception: Failed to open ZIP file /var/lib/mpd/music/USB/Music/Woodstock/The Woodstock Festival/The Woodstock Festival CD1/Covers.zip
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i warning
Jun 15 11:20 : update: no read permissions on USB/Music/Bonnie Raitt/Longing in Their Hearts/10 Storm Warning.flac
Jun 15 11:20 : update: no read permissions on USB/Music/Bob James/Restless/05 Storm Warning.flac
Jun 15 11:20 : update: updating USB/Music/Dr. John/[2005] Sippiana Hericane/02 - Wade Hurricane Suite - Storm Warning.flac
Jun 15 11:22 : update: no read permissions on USB/Music/Jazz/Chesky Records_ Jazz Sampler, Volume 1/27 [unknown] - WARNING ANNOUNCEMENT_ For test instruments only, turn down Volume.flac
Jun 15 11:23 : update: updating USB/Music/Buffalo Springfield/1968 - Long Beach, The Final Concert (Bootleg) [FLAC]/03 - stage warning.flac
volumio@pime:~$

After doing Update: (shut down and rebooted first)
Welcome to Volumio for Raspberry Pi (6.1.77-v7+ armv7l)
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail
[sudo] password for volumio:
Jun 15 11:31 : exception: Failed to open /var/lib/mpd/music/USB/Music/lost+found: Permission denied
Jun 15 11:31 : update: no read permissions on USB/Music/Bonnie Raitt/Slipstream/04 You Can’t Fail Me Now.flac
Jun 15 11:31 : exception: Failed to open ZIP file /var/lib/mpd/music/USB/Music/Woodstock/The Woodstock Festival/The Woodstock Festival CD1/Covers.zip
Jun 15 11:31 : update: no read permissions on USB/Music/The 5th Dimension/Up-Up and Away_ The Definitive Collection/1-11 Aquarius_Let the Sunshine In (The Flesh Failures).mp3
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i error
Jun 15 11:31 : update: no read permissions on USB/Music/Steppenwolf/The Second/09 Lost and Found by Trial and Error.flac
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i exception
Jun 15 11:31 : exception: Failed to open /var/lib/mpd/music/USB/Music/lost+found: Permission denied
Jun 15 11:31 : exception: Failed to open ZIP file /var/lib/mpd/music/USB/Music/Woodstock/The Woodstock Festival/The Woodstock Festival CD1/Covers.zip
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i warning
Jun 15 11:31 : update: no read permissions on USB/Music/Bonnie Raitt/Longing in Their Hearts/10 Storm Warning.flac
Jun 15 11:31 : update: no read permissions on USB/Music/Bob James/Restless/05 Storm Warning.flac
Jun 15 11:31 : update: no read permissions on USB/Music/Jazz/Chesky Records_ Jazz Sampler, Volume 1/27 [unknown] - WARNING ANNOUNCEMENT_ For test instruments only, turn down Volume.flac
volumio@pime:~$

Hey @dmtparker,

You have 3 identified by mpd issues with your music library.

  1. lost+found which acts like a recycle bin.
  2. Compressed files with zip, mpd does not play such files
  3. Permissions.

Whilst logged in with ssh session please do:

ls -la /data

If there is shown USB

ls -la /data/USB

Kind Regards,

Welcome to Volumio for Raspberry Pi (6.1.77-v7+ armv7l)
volumio@pime:~$ ls -la /data
total 331
drwxr-xr-x 1 volumio volumio 1024 Jun 10 20:44 .
drwxrwxrwx 1 root root 1024 Dec 31 1969 …
drwxr-xr-x 6 volumio volumio 1024 Mar 31 2022 albumart
drwxr-xr-x 2 volumio volumio 1024 Mar 31 2022 backgrounds
drwxr-xr-x 6 volumio volumio 1024 May 9 16:19 configuration
drwxr-xr-x 2 volumio volumio 1024 Mar 31 2022 favourites
drwxr-xr-x 2 root root 1024 May 9 15:57 flagfiles
drwxrwxrwx 1 root root 1024 Mar 31 2022 INTERNAL
-rw-r–r-- 1 volumio volumio 50024 Jun 14 22:45 laststates.json
drwxr-xr-x 2 volumio volumio 1024 Mar 31 2022 playerstate
drwxr-xr-x 2 volumio volumio 1024 Mar 31 2022 playlist
drwxr-xr-x 2 volumio volumio 1024 Mar 31 2022 plugins
-rw-r–r-- 1 volumio volumio 265130 Jun 14 22:45 queue
-rw-r–r-- 1 volumio volumio 527 Jun 10 19:29 updatesHistoryFile
-rw-r–r-- 1 volumio volumio 22 Jun 10 19:29 volumio-update.tmp
No USB shown, but there IS one plugged in with all the music on it. Not sure why it is not showing up. I can unplug the SSD, move it to my computer and fix those issues I think.

Hey @dmtparker,

When you plug the USB disk to your computer in the root of it create file .mpdignore with entries

lost+found
*.ZIP
*.zip

Set permissions to:

owner group others recursively or use mask
x/r/w x/r x/r folders and subfolders 755
r/w r r all files 644

x - execute
r - read
w - write

Kind Regards,

OK, this is weird. When I got the HDD to my computer and searched for *.zip, there were no files found. I also set permissions to read for the entire disc, but I’m still getting some ‘permission denied’ errors. I guess I can go back and fix each individual file. Here are the results after doing a Rescan:
Welcome to Volumio for Raspberry Pi (6.1.77-v7+ armv7l)
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail
[sudo] password for volumio:
Jun 15 16:56 : update: no read permissions on USB/Music/Bonnie Raitt/Slipstream/04 You Can’t Fail Me Now.flac
Jun 15 16:59 : update: no read permissions on USB/Music/The 5th Dimension/Up-Up and Away_ The Definitive Collection/1-11 Aquarius_Let the Sunshine In (The Flesh Failures).mp3
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i error
Jun 15 16:53 : update: updating USB/Music/Classical/Mozart/Operas/120 - KV 087 Mitridate, re di ponto - 1770 - 20 - Act II - Aria Farnace- Va, l’error mio palesa.flac
Jun 15 16:53 : update: updating USB/Music/Classical/Mozart/Operas/130 - KV 087 Mitridate, re di ponto - 1770 - 30 - Act II - Aria Farnace- Son reo- l’error confesso.flac
Jun 15 16:56 : update: no read permissions on USB/Music/Steppenwolf/The Second/09 Lost and Found by Trial and Error.flac
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i exception
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i warning
Jun 15 16:56 : update: no read permissions on USB/Music/Bonnie Raitt/Longing in Their Hearts/10 Storm Warning.flac
Jun 15 16:56 : update: no read permissions on USB/Music/Bob James/Restless/05 Storm Warning.flac
Jun 15 16:56 : update: updating USB/Music/Dr. John/[2005] Sippiana Hericane/02 - Wade Hurricane Suite - Storm Warning.flac
Jun 15 16:58 : update: no read permissions on USB/Music/Jazz/Chesky Records_ Jazz Sampler, Volume 1/27 [unknown] - WARNING ANNOUNCEMENT_ For test instruments only, turn down Volume.flac
Jun 15 16:58 : update: updating USB/Music/Buffalo Springfield/1968 - Long Beach, The Final Concert (Bootleg) [FLAC]/03 - stage warning.flac

OK, so previously I had changed permissions using Thunar. This time I used the command line with “sudo chmod -R 755 /media/mark/Music”
Now with reScan:
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i fail
[sudo] password for volumio:
Jun 15 16:56 : update: no read permissions on USB/Music/Bonnie Raitt/Slipstream/04 You Can’t Fail Me Now.flac
Jun 15 16:59 : update: no read permissions on USB/Music/The 5th Dimension/Up-Up and Away_ The Definitive Collection/1-11 Aquarius_Let the Sunshine In (The Flesh Failures).mp3
Jun 15 17:30 : update: added USB/Music/Bonnie Raitt/Slipstream/04 You Can’t Fail Me Now.flac
Jun 15 17:32 : mpg123: mpg123_getformat() failed: Message: I am done with this track.
Jun 15 17:32 : ffmpeg/mp3: Failed to read frame size: Could not seek to 1026.
Jun 15 17:32 : mpg123: mpg123_getformat() failed: Message: I am done with this track.
Jun 15 17:32 : ffmpeg/mp3: Failed to read frame size: Could not seek to 1026.
Jun 15 17:32 : mpg123: mpg123_getformat() failed: Message: I am done with this track.
Jun 15 17:32 : ffmpeg/mp3: Failed to read frame size: Could not seek to 1026.
Jun 15 17:32 : mpg123: mpg123_getformat() failed: Message: I am done with this track.
Jun 15 17:32 : ffmpeg/mp3: Failed to read frame size: Could not seek to 1026.
Jun 15 17:32 : mpg123: mpg123_getformat() failed: Message: I am done with this track.
Jun 15 17:32 : ffmpeg/mp3: Failed to read frame size: Could not seek to 1026.
Jun 15 17:33 : ffmpeg/flac: decode_frame() failed
Jun 15 17:37 : update: added USB/Music/The 5th Dimension/Up-Up and Away_ The Definitive Collection/1-11 Aquarius_Let the Sunshine In (The Flesh Failures).mp3
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i error
Jun 15 16:53 : update: updating USB/Music/Classical/Mozart/Operas/120 - KV 087 Mitridate, re di ponto - 1770 - 20 - Act II - Aria Farnace- Va, l’error mio palesa.flac
Jun 15 16:53 : update: updating USB/Music/Classical/Mozart/Operas/130 - KV 087 Mitridate, re di ponto - 1770 - 30 - Act II - Aria Farnace- Son reo- l’error confesso.flac
Jun 15 16:56 : update: no read permissions on USB/Music/Steppenwolf/The Second/09 Lost and Found by Trial and Error.flac
Jun 15 17:07 : update: removing USB/Music/Classical/Mozart/Operas/130 - KV 087 Mitridate, re di ponto - 1770 - 30 - Act II - Aria Farnace- Son reo- l’error confesso.flac
Jun 15 17:07 : update: removing USB/Music/Classical/Mozart/Operas/120 - KV 087 Mitridate, re di ponto - 1770 - 20 - Act II - Aria Farnace- Va, l’error mio palesa.flac
Jun 15 17:25 : update: added USB/Music/Classical/Mozart/Operas/120 - KV 087 Mitridate, re di ponto - 1770 - 20 - Act II - Aria Farnace- Va, l’error mio palesa.flac
Jun 15 17:25 : update: added USB/Music/Classical/Mozart/Operas/130 - KV 087 Mitridate, re di ponto - 1770 - 30 - Act II - Aria Farnace- Son reo- l’error confesso.flac
Jun 15 17:30 : update: added USB/Music/Steppenwolf/The Second/09 Lost and Found by Trial and Error.flac
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i exception
volumio@pime:~$ sudo cat /var/log/mpd.log | grep -i warning
Jun 15 16:56 : update: no read permissions on USB/Music/Bonnie Raitt/Longing in Their Hearts/10 Storm Warning.flac
Jun 15 16:56 : update: no read permissions on USB/Music/Bob James/Restless/05 Storm Warning.flac
Jun 15 16:56 : update: updating USB/Music/Dr. John/[2005] Sippiana Hericane/02 - Wade Hurricane Suite - Storm Warning.flac
Jun 15 16:58 : update: no read permissions on USB/Music/Jazz/Chesky Records_ Jazz Sampler, Volume 1/27 [unknown] - WARNING ANNOUNCEMENT_ For test instruments only, turn down Volume.flac
Jun 15 16:58 : update: updating USB/Music/Buffalo Springfield/1968 - Long Beach, The Final Concert (Bootleg) [FLAC]/03 - stage warning.flac
Jun 15 17:07 : update: removing USB/Music/Buffalo Springfield/1968 - Long Beach, The Final Concert (Bootleg) [FLAC]/03 - stage warning.flac
Jun 15 17:07 : update: removing USB/Music/Dr. John/[2005] Sippiana Hericane/02 - Wade Hurricane Suite - Storm Warning.flac
Jun 15 17:30 : update: added USB/Music/Bonnie Raitt/Longing in Their Hearts/10 Storm Warning.flac
Jun 15 17:31 : update: added USB/Music/Bob James/Restless/05 Storm Warning.flac
Jun 15 17:31 : update: added USB/Music/Dr. John/[2005] Sippiana Hericane/02 - Wade Hurricane Suite - Storm Warning.flac
Jun 15 17:36 : update: added USB/Music/Jazz/Chesky Records_ Jazz Sampler, Volume 1/27 [unknown] - WARNING ANNOUNCEMENT_ For test instruments only, turn down Volume.flac
Jun 15 17:37 : update: added USB/Music/Buffalo Springfield/1968 - Long Beach, The Final Concert (Bootleg) [FLAC]/03 - stage warning.flac

Hey @dmtparker,

There is clearly something still happening with the permissions of your music library.
I suggest to re-format USB storage. Of course, make a copy of .mpdignore and all your music files first.

Kind Regards,

I can do that again, but I actually reformatted the drive just before loading the music and all this happening?!?
This time when I opened Volumio, it still showed “Fins” and then had the revolving circle for awhile. When I looked, the database had been updated and all of my music was there. The next time I booted it, Fins was still there and without my telling it, the database rebuilt, taking quite awhile (like maybe a minute). Then my songs were there and would play normally. Rebooting again (while a different song was playing), I got immediately got the revolving volume control for many seconds, maybe a minute, and then Fins was back, but the database was complete and played normally. Not sure what it is with the ‘last played’ persisting as Fins, but I guess as long as I don’t mind the slow start-up, it works now. ??