Confused about folder structure

I’m running Roon in Docker, and have created 2 volumes mapped to /music and /music2, each organized in sub-folders by artist and then by album. However, when I look at the folder structure in the Roon app, I only see one folder called music. When an artist is present in both /music and /music2, I see two copies of that artist’s folder together, each one with its unique contents depending whether it is in /music or /music2. Here is an image which show this:

Is this working as intended? Does Roon merge all music folders in it’s folder display? Because it would be useful to be able to browse the /music and /music2 folders separately.

What Docker image are you using? Some of these map /music to the local file system. Nonetheless, you should be able to navigate the file system and add two distinct storage locations.

Please share a screenshot of your folder settings.

Here’s a screenshot. It only shows one folder, “music”. However I can assure you there are two folders, called /music and /music2, with different music in them.

I had added these folders on startup when I first ran the Roon Android app.

I’m running this docker setup: GitHub - elgeeko1/roon-server-docker: Dockerized Roon Server to discover everything about music.

Here is a listing of the root directory of the docker container, showing the two music folders.

Also, here are the two “Chris Isaac” folders:
image

You need to mount each drive in Roon as separate entities as it’s seeing one top level folder and will look down that and pick everything up. You would need separate mounts to music and music 2 or it will treat it as one drive and just show you the folders for all of it so you get duplicates.

That is what I did. Here is the Docker run command:

In text format:

docker run -d \
  --name roon \
  --restart unless-stopped \ 
  -v '/mnt/d/My Music/:/music:ro' \
  -v '/mnt/d/Molly Music:/music2:ro' \
  -v /home/wpwoodjr/roon-docker/database:/opt/RoonServer \
  -v /home/wpwoodjr/roon-docker/cache:/var/roon \
  --network host \
  roon

Try escaping the paths, e.g., /mnt/d/My\ Music/.

Thanks, but the paths are enclosed by single quotes which does the same thing. It’s not that the volumes aren’t mounting properly, it’s that somehow Roon is merging /music with /music2, and then only showing /music in the folder settings.

Yes, I know, but sometimes things don’t work as expected. I’m still not sure if you amended the Docker file to create the addional mount point with the correct permissions and ownership*; docker run is insuffient. That said, that doen’t account for the duplicates.

Finally, have you added the second folder in Roon, as @CrystalGipsy mentioned?

*Roon runs as root, and I think many Docker images for Roon need to run in priveledged mode. Incidentally, I use a non-priviledged custom image using Podman.

The Dockerfile has no VOLUME statements in it, but they aren’t needed since:
image

However I’m assigning external folders to the volume with:

  -v '/mnt/d/My Music/:/music:ro' \
  -v '/mnt/d/Molly Music:/music2:ro' \

rather than creating new Docker volumes.

As you can see here, the folders have the correct permissions and ownership:
image

In my setup, Roon is running as the ubuntu user, not root:

Finally, have you added the second folder in Roon, as @CrystalGipsy mentioned?

Good question! I’m not sure I ever added the second folder when starting Roon for the first time. If I didn’t, it’s still weird the Roon is indexing it anyway.

But the main thing I’m concerned about is that Roon is mixing the contents of the two folders into one view under /music. I would expect to see two folders, /music and /music2. It seems like Roon is indexing /music* rather than just /music.

It will mix them and treat as one as said earlier your adding one top level directory which is the whole volume. You need to navigate down and add in each level directory as a shared folder not the top level music volume.

Mine above has same root directory but I go into the tree to add the folders to split it. Roon will see this as one flat structure but when you folder navigate it will be divided by location.

Added bonus is you can focus on the directory of each one two and save as a bookmark for ease of access and only show in album view one’s from
location. It willl automatically update the bookmark when you add new music to either drive.

You need to navigate down and add in each level directory as a shared folder not the top level music volume.

So I have two top level music volumes - one mapped to my music and one to my wife’s; but I think you are saying there can only be one top level music volume, and then shared folders underneath it? Because Roon will merge any top level ones?

How does that work if there are two folders in different hierarchies, for instance if they are on different hard drives?

They are mounted under central top level folder in your scenarion regardless of if they are seperate drives, Roon doesn’t know they are different drives because of the way your mounting them in the container under one mount point called Music. To Roon its one flat structure called Music and all subfolders are analysed. If you have it as two separate mounts then you add each drive as a watched folder. Or you need to navigate down to where the drives have their own folder under the main mount point and add those. If you just add Music it will add it all as one big watched folder as its the top of the folder hierarchy.

I don’t agree with that. VOLUME creates the mountpoint in the container.

From the official documentation …

VOLUME

VOLUME ["/data"]

The VOLUME instruction creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers. The value can be a JSON array, VOLUME ["/var/log/"], or a plain string with multiple arguments, such as VOLUME /var/log or VOLUME /var/log /var/db. For more information/examples and mounting instructions via the Docker client, refer to Share Directories via Volumes documentation.

The docker run command initializes the newly created volume with any data that exists at the specified location within the base image.

Also, your Docker run should be like this.

…
 -v "/mnt/d/My Music/":/music:ro \
…

Finally, in Roon create folders for each mount point.

No, one is mounted at /music and the other mount point is /music2:
image

Here is a directory listing of “/” within the docker container, where you can see the two mount points:
image

So that’s why I’m confused, why is Roon merging those two mount points?

From your own screenshot, you only have one folder setup in Roon Settings → Storage.

Have you since added a second folder? Nonetheless, it would make more sense to mount a single folder in the container, and then use Roon storage locations to mount individual sub folders.

Can you show the root folder structure in Roon, e.g., …

I still think you should use the volume directive as this creates the mount point with the correct permissions. You really need to try these things, at least, to eliminate them.

Finally, from My Library → Albums, select two Isaak releases on different mounts, and check the file paths, i.e., View file info…

image

You screenshot of your shared folder shows one directory being watched called Music. This is the mount point I am referring to. Roon will treat everything below that as one source.

Both Chis Isaak albums show in the Roon Android app as being under All folders > music > Chris Isaak.


However, one is actually under /music (“Heart Shaped World”) and the other is under /music2 (“San Francisco Days”), as shown by this listing inside the docker container:
image

Somehow Roon is merging /music2 with /music.

No, Roon isn’t merging them since you have only setup one watched folder in Roon. The issue is with your container.

What issue are you talking about? The container is set up with two separate music folders. You can see by the file system listings above. Yet Roon is showing music from both folders as if they were merged.