Roon 1.3, docker, local folders [resolved]

Hi,

I think there is a little problem with local folders when Roon Server is running under docker container. I’ve got several local folders added within Roon 1.2 as watched folder and they are still working OK. But when I try add another folder on Roon 1.3, all I see is opt and hosts folder. I think there might be problem with identifying folder only when they are mounted from block device under /dev. Below are two screenshots:

Same problem is when I try to add local folder as backup destination.

Best regards,
Maciek

does your /opt work?

What folders are you trying to watch?

I mapped a host folder (/mnt/…) to /music in my container and I can see the files just fine if I run bash in the container.

Yes, /opt works but it is mapped to folder with roon application and database, not media repository. Biggest problem is with invisible /unraid folder. hosts is also strange, under docker it is mapped to /etc/hosts file via loop0 device.

I haven’t that problem with Roon 1.2. All is fine under docker image, all folders are working just fine under bash or mc or whatever. Folders added under Roon 1.2 also works fine under 1.3 (see screenshot below), I simply cannot add any other folder becouse I can’t see /unraid mountpoint.

Best regards,
Maciek

the problem is that your shfs is throwing us off… our strategy i think needs to be to expose / on linux always, even when we dont support getting the filesystem uuid out of it.

to get the filesystem information, including the UUID, we use udevadm or blkid (which requires root).

the commands we execute are:

udevadm info --query all SPEC

where SPEC is the /dev/xxxx from /proc/mounts

and if that fails, we try:

blkid SPEC and parse the output looking for LABEL= and UUID= and load up /sys/block/DEVICE/device/model and /sys/block/DEVICE/device/vendor to get the model/vendor info

all that blkid and sys/block stuff requires root. udevadm does not.

can you possibly run those commands and tell us which work and which dont?

also, can you give me the output of cat /proc/mounts?

Sure,

root@Tower:/# id
uid=0(root) gid=0(root) groups=0(root)

root@Tower:/# cat /proc/mounts
/dev/loop0 / btrfs rw,relatime,space_cache,subvolid=4623,subvol=/btrfs/subvolumes/0129c5bcebe649505f14a3194ae2ee5bd449de03c639c209b86f2e5fe5dcfff3 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
blkio /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
memory /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
devices /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
net_cls /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
perf_event /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
pids /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
shfs /unraid fuse.shfs rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0
/dev/sdb1 /opt btrfs rw,noatime,nodiratime,ssd,space_cache,subvolid=5,subvol=/appdata/roon/Application 0 0
shfs /var/roon fuse.shfs rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0
/dev/loop0 /etc/resolv.conf btrfs rw,relatime,space_cache,subvolid=5,subvol=/containers/062104e01332a713f5f38300f47d9a487d0e3385db1cf24547117ac682ff6c31/resolv.conf 0 0
/dev/loop0 /etc/hostname btrfs rw,relatime,space_cache,subvolid=5,subvol=/containers/062104e01332a713f5f38300f47d9a487d0e3385db1cf24547117ac682ff6c31/hostname 0 0
/dev/loop0 /etc/hosts btrfs rw,relatime,space_cache,subvolid=5,subvol=/containers/062104e01332a713f5f38300f47d9a487d0e3385db1cf24547117ac682ff6c31/hosts 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=65536k 0 0

root@Tower:/# udevadm info --query all /dev/sdb1
P: /devices/pci0000:00/0000:00:1f.2/ata1/host1/target1:0:0/1:0:0:0/block/sdb/sdb1
N: sdb1
E: DEVNAME=/dev/sdb1
E: DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata1/host1/target1:0:0/1:0:0:0/block/sdb/sdb1
E: DEVTYPE=partition
E: MAJOR=8
E: MINOR=17
E: PARTN=1
E: SUBSYSTEM=block

root@Tower:/# udevadm info --query all /dev/loop0
P: /devices/virtual/block/loop0
N: loop0
E: DEVNAME=/dev/loop0
E: DEVPATH=/devices/virtual/block/loop0
E: DEVTYPE=disk
E: MAJOR=7
E: MINOR=0
E: SUBSYSTEM=block

root@Tower:/# udevadm info --query all shfs
Unknown device, --name=, --path=, or absolute path in /dev/ or /sys expected.

root@Tower:/# blkid
/dev/loop0: UUID="aac68457-1e61-4a09-9449-0e98e9ddf94a" UUID_SUB="b0194ac0-3a1c-4c3f-80b5-99042ce921f8" TYPE="btrfs"
/dev/sdb1: UUID="5983c9b0-9bdb-41e0-90d5-d33c6f1edab3" UUID_SUB="231408f0-e6a7-49d3-a95c-3dff219ed797" TYPE="btrfs"
/dev/loop1: UUID="b4824a34-bd9d-4efc-b507-4d82edcf585c" UUID_SUB="0972900e-b5e4-494f-a9e0-4c7da3bd1528" TYPE="btrfs"
/dev/sda1: LABEL="UNRAID" UUID="E8BA-78E5" TYPE="vfat"
/dev/sdc1: UUID="6ec2cbe0-1b19-48fd-a95a-9a0df0c8c3aa" TYPE="xfs"
/dev/sdd1: UUID="0a47606b-5d94-4ce2-a4ff-49a7db69010a" TYPE="xfs"
/dev/sde1: UUID="8a7cdeef-446c-48d6-afda-3ace4a032e8c" TYPE="xfs"
/dev/sdf1: UUID="eef97564-02e1-4cc9-a27f-e96461a2ec2c" TYPE="xfs"
/dev/md1: UUID="eef97564-02e1-4cc9-a27f-e96461a2ec2c" TYPE="xfs"
/dev/md2: UUID="0a47606b-5d94-4ce2-a4ff-49a7db69010a" TYPE="xfs"
/dev/md3: UUID="8a7cdeef-446c-48d6-afda-3ace4a032e8c" TYPE="xfs"

Best regards,
Maciek

are you running RoonServer as root? I ask because although udevadm is not happy with your /, blkid should be

Hi,

Yes, roon is started as root.

root@Tower:/# ps aux | grep -i roon
root         1  0.0  0.0   4448   764 ?        Ss   05:26   0:00 /bin/sh -c printf "y\ny\n" | /tmp/roonserver-installer-linuxx64.sh && tail -f /dev/null
root        46  0.0  0.0  17992  3012 ?        S    05:26   0:00 /bin/bash /opt/RoonServer/start.sh
root        51  0.0  0.1 546404 23336 ?        Sl   05:26   0:02 /opt/RoonServer/Mono/bin/RoonServer --debug --gc=sgen --server RoonServer.exe
root      1894  107  5.6 3247292 916916 ?      Sl   06:10 898:50 /opt/RoonServer/Mono/bin/RoonAppliance --debug --gc=sgen --server RoonAppliance.exe -watchdogport=41857
root      1896  0.0  0.0   7288   844 ?        S    06:10   0:00 /opt/RoonServer/Server/processreaper 1894
root      2359  0.0  0.1 758080 21688 ?        Sl   06:10   0:07 /opt/RoonServer/Mono/bin/RAATServer --debug --gc=sgen --server RAATServer.exe

My / is mounted on /dev/loop0 device and it is recognized and identified by udevadm as far i can see.

Best regards,
Maciek

Ok, i’ve made some progres.

As you can see, my / is now browsable.

I’ve discovered that I have several mount points on same device as / (/dev/loop0)

root@Tower:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       30G  8.3G   18G  32% /
tmpfs           7.8G  8.0K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
shfs            5.7T  5.2T  584G  90% /unraid
/dev/sdb1       233G  101G  131G  44% /opt
/dev/loop0       30G  8.3G   18G  32% /etc/hosts
shm              64M   12K   64M   1% /dev/shm

root@Tower:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       30G  8.3G   18G  32% /
tmpfs           7.8G  8.0K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
shfs            5.7T  5.2T  584G  90% /unraid
/dev/sdb1       233G  101G  131G  44% /opt
/dev/loop0       30G  8.3G   18G  32% /etc/hostname
shm              64M   12K   64M   1% /dev/shm
root@Tower:/# umount /etc/hostname
root@Tower:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       30G  8.3G   18G  32% /
tmpfs           7.8G  8.0K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
shfs            5.7T  5.2T  584G  90% /unraid
/dev/sdb1       233G  101G  131G  44% /opt
/dev/loop0       30G  8.3G   18G  32% /etc/resolv.conf
shm              64M   12K   64M   1% /dev/shm
root@Tower:/# umount /etc/resolv.conf
root@Tower:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       30G  8.3G   18G  32% /
tmpfs           7.8G  8.0K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
shfs            5.7T  5.2T  584G  90% /unraid
/dev/sdb1       233G  101G  131G  44% /opt
shm              64M   12K   64M   1% /dev/shm
root@Tower:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       30G  8.3G   18G  32% /
tmpfs           7.8G  8.0K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
shfs            5.7T  5.2T  584G  90% /unraid
/dev/sdb1       233G  101G  131G  44% /opt
shm              64M   12K   64M   1% /dev/shm
root@Tower:/# /etc/init.d/roonserver restart

After unmounting everything but / from /dev/loop0, my root folder is browsable from Roon.

Best regards,
Maciek

ok wow, that is huge… can you get it to break again, and then send me the logs for your RoonServer?

nevermind, we found the problem… you have two things mounted from /dev/loop0, which is weird… we can fix this. give me until the build later today to fix this.

Great, thanks for your support! :slight_smile:

Best regards,
Maciek

we are actually having some trouble with this… can you explain how this /dev/loop0 is working and what the environment is?

the problem is that your / is working fine, but then /etc/hosts clobbers it. thats weird, but it should work fine… but real issue is that your /etc/hosts is empty and your / is not, but both are the same device. its wacky. thats not how devices should work

Containers don’t have a block device associated with /. blkid returns nothing even when running as root inside the container.

yah we just figured that out in the normal cases… this is a nightmare… in @maciekb’s case, he DOES have blkid returning stuff!

we have an idea for a fix… if you lack a / by normal means, we will just create a virtual / and then you can browse by path

but in @maciekb’s case, it could lead to trouble if his loop0 additional mountpoints disappear, and / comes back to life

or maybe on linux, we should just do / virtually always

What do you mean by virtual /? Is that changing the state of the system or just putting a virtual storage device in the Roon database referring to / ?

I’d be happy to test any of this tonight. As it stands my Roon deployment is dead. I could restore to v1.2, but I don’t know how I would roll back the clients especially iOS.

@Patrick_Lang what is your /proc/mounts like? what is your setup and what are your symptoms?

fix coming in build later today. you will have to edit your storage locations, but it will work.