Hi,
I used Balena Sound for a month now, and wanted to add more “features” to the Raspberry Pi I use to run it. An important feature I’m trying to add is the support of Transmission.
I tried to figure out how to do it, but I’m not sure how to do it working, since I wasn’t able to run the
apt-get update | apt-get upgrade
commands, that I usually use.
Do you know how I can proceed?
Thanks for your help
Hi,
I know that I’m a beginner, and I didn’t achieve what you said (if I understood well). So I have uninstalled the BalenaSound features in order to push the whole package at a single time.
So I downloaded the docker image you mentionned and placed it at the same level as the three other services (then I have the folders : airplay, bluetooth-audio, docker-transmission-master, spotify. At this level I also have the docker-compose.yml and few others file).
As you mentionned, I have added the config of transmission into my docker-compose.yml in the following way:
But I have this error when I try to push it to the RaspberryPi:
[Error] Could not parse compose file
[debug] handling message: {“message”:“\u001b[31m[Error]\u001b[39m Bind mounts are not allowed”,“isError”:true}
[Error] Bind mounts are not allowed
Do you know what I did wrong :?
Many thanks for your help, and sorry for my english
Michael
PS: Sorry but I didn’t achieved to indent this post…
The balena docs mention certain bind mount restrictions [1], linking to another doc [2] where certain container labels are able to toggle some specific bind mounts enumated in a table. If you want a bind-mount into the host OS fs other than that, it’s not possible, as yet.
One way to work around the lack of arbitrary bind mounts is to re-evaluate whether a bind mount is needed; sometimes a named volume, which can be shared among the other running containers [3], is good enough.
Hi,
first of all, thanks for your help.
I finally achieved to run all this stuff, but still get a problem. When I mount my external drive (2TB), I can not achieve to use it in this context.
I tried this first method : https://www.balena.io/docs/learn/develop/runtime/#mounting-external-storage-media, but I can’t use it, or I don’t know how to use it.
Hi Michael, I don’t see anything immediately obvious with the compose file you have provided. What issues are you seeing when you mount the external drive which is preventing you from using it? Are there are errors or logs produced? Thanks.
Unfortunately I do not have any error.
The volume seems to mount (I have a "xxxxxx_MICHAEL volume in the volume list), but not to be connected with the external Hard Drive.
One of the problem, is when transmission tries to import bigger files, I have a “no more space” error.
Therefore I suspect two problems:
The HDD is correctly mount but I fail to access it or
The volume that is created is not linked to the HDD
Here is the procedure of how I mount my HDD, to the docker file of transmission I have added the following line:
RUN echo "LABEL=mysdcard /mnt/storage ext4 rw,relatime,discard,data=ordered 0 2" >> /etc/fstab
And I have created also in the transmission folder, a start.sh file with the following line: mkdir -p /mnt/storage && mount /mnt/storage
So first of all, I want to clarify that it’s not possible to associate an engine volume you define in docker-compose with an external drive. It’s a feature in the engine that we want to implement in the future, but it’s not possible at the moment.
However, what you can do is mounting an external drive in a single privileged container.
And this is what is described in our docs. We’ll need to double-check if the information there is still actual but if it does not work for you(please let us know), what I would recommend is to follow the next steps (we tested this sequence today):
ssh into the container
make sure you see the disk device in /dev directory (something like /dev/sda1)
run mkdir /mnt/storage
run mount -t ext4 -o rw /dev/sda1 /mnt/storage (changing the file system type and device path as needed)
You should be able to see the content of the drive in /mnt/storage. If that works, doing the same steps in your container entry point should also work.
Hope it’s helpful.
I tried what you said, but I had a problem. Don’t know if it’s normal, but I can’t access the /dev/sda1, I can only see it.
The mount command gives me an no such device error.
The disk is correctly plugged and working (on other devices).
I tried by both way the ssh in BalenaCloud dashboard and the ssh via the CLI.
Thanks, that looks good. Can you provide the exact commands you are using to create the mount point and mount the device? Also, can you confirm the filesystem type of the device from lsblk -f. Also, are you trying to mount this from the host OS or from a container?
I use these commands in the BalenaCloud, Transmission SSH.
mkdir /mnt/storage
mount -t ntfs -o rw /dev/sda1 /mnt/storage
Here is the result of lsblk -f:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
`-sda1 ntfs MICHAEL D4FECAC9FECAA2DA
…
I tried both (still using web interface), but from the host I have an Read-only file system error, and from transmission container I have an no such device error.
I just did it and I have the same no such device error on the container terminal, but I get an unknown filesystem type 'ntfs' when I try to mount with the OS terminal…