Volumio 3 - Erased my local music library

I have de same problem, please help me, i need to recoverd 2Tb of music

you can try to connect the disk to a pc, right click on the drive => properties => tools => check

Thanks for answering. “windows successfully scanned the drive. no errors found”

and are you’re files still there?

1 Like

I would like to leave a comment on this topic because it happened a few times to me.
My device info

  • OS -Volumio 3.xx(I do not remember the exact version number but it happened with volumio 3)
    *HW: Raspberrypi CM4 with official IO Board 4), External drive Sandisk SSD 1TB USB2.0(happened when formatted NTFS, EXT4), USB DAC

The USB SSD is connected via USB and mounted to /media/Sandisk1TB which I created

This is what I did just before the last time my music files got deleted

    1. I uploaded some music files I ripped from my CDs using sftp
    1. using volumio web interface and clicking the link on the right side of the folder list, I updated the music folder
      then the music files are deleted

I checked /var/log directory. My volumio set up is mostly default and it does not leave many log files. So I checked /var/log/mpd.log
In the log file, I found a lot of “updating” logs then suddenly “removing” (I saved the log texts somewhere but I cannot find it now. Sorry that I canno post it here.)
I checked the whole drive and saw some files and directories are deleted and some still survived.
The difference between the files that are deleted and not deleted is their ‘permissions’
As it happened before, I had files and directory permission as read-only and they did not get deleted. The deleted files were 755 and ‘volumio’ ownership.
Now I set all the music files with 444 permission, directories 755 permission with root ownership. I am enjoying volumio safely with this permission modification.
The reason for 755 for directories is it seems like volumio needs write permission for ‘web album art’. If I set read only permission to directories and update a folder, the spinning for updating does not stop. This is why I do not mount the drive read only with /etc/fstab.

For the developers of Volumio:
I do not know if I am right but music files got deleted just after I ‘updated’ music library. I mean ‘update folder’. It could be related renewing and deleting old web album art cache script. I maybe wrong. I would not suspect MPD’s database update function because it never happened with bare Debian+MPD set up with me.

P.S. this is a little bit long posting and hope the readers are not too annoyed. I just wanted share my experience with everybody, especially generous Volumio development team.

2 Likes

Thanks @songskim

your comment provided quite a lot of useful insights to what the problem might be.

Specifically, the fact that you mount the drive manually, which might trick our algorithm for mounted devices.

My hypothesis is that:

  • A rescan of the drive might trigger udev to think that the drive has been unmounted (maybe due to a voltage drop due to drive spinup)
  • We attempt then to unmount the drive
  • It can’t be unmounted because mpd is scanning it
  • We remove the mountpoint, hence the files

We are working on a fix on this branch: GitHub - volumio/volumio3-backend at fix/usbMount

We will push a release this or next week (we have currently a release in QA, so we will include those commits in the next one).

While we are there, we can also provide a better mounting mechanism for internal drives. As of now, if you want to mount an internal drive in Volumio, you need to label it issd, ihdd, internal hdd or internal ssd. We do that to prevent windows folders which could kill mpd scanning.
If you have other suggestions, let us know

(maybe due to a voltage drop due to drive spinup)

This doesn’t go up for a ssd / usb sticks so it could be something else.

(maybe due to a voltage drop due accessing/activating) the SSD/USB.
I think it’s just given as an example…

oke i understand :slight_smile:

Yeah or any other event that udev recognizes as partition removal…

1 Like

@ volumio
Thank you very much for quick reviewing and finding clues even though my info is not that precise. Thank you.

I’ve never had a problem with my HDD since I chose ext4 as format.
Today, after updating to Volumio 3.251, all my music libray is gone :sob:

Don’t know if it’s actually deleted or is just not visible for some reason.
What can I do to check?

Fortunately I have a backup of the libray on my pc, but before I start copying the files I’d like to know if a deletion is actually happened or not

EDIT: solved by adding the UUID and path in /etc/fstab :partying_face: (the line was gone)

#Raspberry Pi fstab

proc            /proc                proc    defaults                                  0 0
/dev/mmcblk0p1 /boot                vfat    defaults,utf8,user,rw,umask=111,dmask=000 0 1
tmpfs           /var/log             tmpfs   size=20M,nodev,uid=1000,mode=0777,gid=4,  0 0
tmpfs           /var/spool/cups      tmpfs   defaults,noatime,mode=0755                0 0
tmpfs           /var/spool/cups/tmp  tmpfs   defaults,noatime,mode=0755                0 0
tmpfs           /tmp                 tmpfs   defaults,noatime,mode=0755                0 0
tmpfs           /dev/shm             tmpfs   defaults,nosuid,noexec,nodev              0 0
UUID=f62fc3e8-6c28-469d-9136-cf635af0b88d /media/MUSICA ext4 defaults  0      2

Last line is the one I added

Library is not erased: simply the HDD is not mounted.
See: V 3.251 - mounting USB drive problem - #4 by volumio

1 Like

UPDATE: This new release has a fix for this problem of erased drives.
I hope and think that we will never see it happening again.

2 Likes

Yeah, take a look at my “EDIT” in the previous post.
Don’t know if I chose the best way to fix the problem, but I edited fstab to make the system recognize the unit.

1 Like

Actually, doing that could have been dangerous with the previous release. Now it’s not. I suggest to remove this line when you do the next update

@volumio I am freaking out right now. All my files are gone, almost 3TB of music…
I am running a Rpi4 with a 3TB HDD which has been working flawlessly for several years. Volumio 3.179 on the Pi. The Pi is connected via USB to a MiniDSP SHD as preamplifier.
I disconnected the USB cable from the Pi so I could work with the SHD on some filters, when I reconnected this cable to the Pi, Volumio started to update the music library (which is ok), however it finished in a moment and it only has 400 MB of music. I connected my HDD to my computer just to get the nastiest surprise: all my music is gone except 10 folders or so (those 400 MB). WTF???
At this point I am not sure what happened, is there a way to get it back…?? I don’t think so, it does not seem to be just the cache - the HDD itself is almost empty (and no backup! This is years and years of rips from my own music).
Can someone please help? I am gutted.
Edit: I did not update Volumio recently, I am on this build since it was released - I take my time to update just to avoid issues.
Edit 2: logs here: http://logs.volumio.org/volumio/orQSNz2.html

Was the rPi powered when you connected or disconnected the HDD, as It sounds like a power failure.
What you can try is:

  • shutdown the rPi.
  • Disconnect the HDD
  • Connect the HDD to your Windows PC
  • Right click on the disk
  • Select Properties => Tools => Check => Scan drive

And do update, as the current version is pretty stable.

Thanks for replying @Wheaten

  • yes the Pi was powered, but please note I did not disconnect the HDD from the Pi. I disconnected the USB cable between the Pi and the preamp, to connect it to my computer.

  • I performed a check disk as you suggested and it found errors. The log has been uploaded here: HDDkaput - 2e788c31
    It worked, partially. It recovered 39 GB of data, nowhere near the almost 3TB that seemingly are lost forever :frowning:

Checking the Volumio logs you can see the now almost empty HDD:

Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 2.2G 855M 1.3G 41% /imgpart
/dev/loop0 375M 375M 0 100% /static
overlay 27G 1.4G 25G 6% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 4.0K 1.9G 1% /dev/shm
tmpfs 1.9G 13M 1.9G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 0 1.9G 0% /var/spool/cups
tmpfs 1.9G 16M 1.9G 1% /tmp
tmpfs 20M 28K 20M 1% /var/log
tmpfs 1.9G 0 1.9G 0% /var/spool/cups/tmp
/dev/mmcblk0p1 61M 51M 9.2M 85% /boot
/dev/sda1 2.8T 397M 2.8T 1% /media/WD3TB

What could have happened…? It’s not like I disconnected the HDD carelessly, the only thing I can think of is that Volumio suddenly lost the output source (as I disconnected the USB cable from the preamp), and this might have triggered something causing the data loss? A very long shot, but honestly not sure what else could it be. The USB cable between HDD and the Rpi was not removed, and the Pi was not restarted or powered off. Each device is in a separate power strip which was powering other devices and they remained powered while this happened.

Seems the location table got corrupted.
As thumb of rules Never plug an unplug active USB devices on a powered rPi. It will/can cause issues. For the same reason Windows has a feature to “Safely remove USB Devices”.

In your case it seems that unplugging a USB device, caused a dip or swell in the voltage regulation of the rPi, for which the disk paid the penalty.
Is your HDD powered by the rPi or an external PSU?