Music on SD card, Raspi3 Volumio 2 RC1

Hi, I want to use a 16GB SD card in my Raspi to store both the system and my music.

I copied my music folder onto the volumio_data drive that showed up in windows.
When I try to navigate to the folder, it doesn’t show up.
At first, I thought it had been deleted on boot-up, but when I checked the SD card, it was still there.
I copied it to the home folder at first, then I tried /var/lib/music, to the same result.

Does windows just mess up with the FS, so I have to try it from linux?
Thanks in advance

Hi,

when you say, you copied the music to the volumio_data drive, did you mean to the data partition of the SD card?
To which folder did you exactly copy the files, can you give us a short descriptions of the folders you see in the root of your data partition?

There are a few things going on behind the scene while booting and probably the first reason why you don’t see your music.
There is a second reason, I’ll come to that afterwards.

After the kernel has been loaded, the Volumio Initrd script gets control.
Initrd mounts the volumio_currents.sqsh from the volumio partition and mounts it as a squashfs (unpacked, readonly) filesystem on a loop device, let’s call it /mnt/static.
It then mounts the volumio_data partition and mounts the dyn folder which is in it, let’s call it /mnt/dyn.
With those 2 mounts, Initrd combines the RO /mnt/static and the RW /mnt/dyn into a new “overlayed” filesystem.
Overlay means: you can access the filesystem anyway you want. If something is changed somewhere, it will be in the dyn part, also the changes you think you made to the static part.
This on-the-fly filesystem is then used as the rootfs, which you will see as “/” after boot is complete.
Then control is transferred to the real init script in that rootfs and Volumio starts booting.

So coming back to your volumio_data partition. You will find 2 folders there, dyn and union.
union is the mountpoint for the overlay filesystem, useless to write anything in there.
dyn holds all the dynamic data that was added at runtime (which is actually the difference between the static and the overlays filesystem).

So basically, anything you write to the volumio_partition outside dyn from another system is completely ignored, so you do not see your music anywhere at runtime.
The second reason why you will not find your music is because mpd needs to be told to start scanning a folder structure.
Volumio does not do that for the rootfs it is starting from by default.
Volumio tells mpd when you configure an external (NAS) library.
When you attach a removable usb device, the system mounts it automatically and in the process tells mpd to scan the newly mounted USB device.

Now this is the only thing you could ask for as an improvement, some standard folder in /dyn/data to be used as your private music lib, to be mounted when it is present and (re)scanned after mounting. I’m not sure yet, how you got volumio_data visible in MS Windows

Why not put this as an issue in github.com/volumio/Volumio2 and see what the developers think of it.

okay, I had no Idea that this system is so complex, thanks for explaining it to me!
Also, I seem to have a driver for ext4 installed on my windows system, no Idea when I did that :laughing:

I just tried this workaround, and so far it seems to work:

I resized the volumio_data partition to 2GB (using a gparted live CD I had lying around), and created a new, 10GB large partition I called “music”.

Then, I added a fstab entry for it, mounting it to /mnt/USB.

For the future, something similar could be done, and it would get it’s own mount at /mnt/LOCAL or something like that.

I’m just happy that I learned something new and got it working for now.

Well, do a feature request on http://github.com/volumio/Volumio2, because if nobody asks, it won’t get done…

you should have checked the newest issue… as I have no idea how github works, I assume the label “Feature Request” will be added by someone?

Oh, I still have to find a way to copy new music onto the SD card over the network, but I guess that won’t be as easy :frowning:

Ah, missed that one. Michelangelo already answered it.
“Feature Request” is a label to clearly identify issues as “requests”, it is on the list of to-do’s now.