Docker invalid mount config for type "bind"

Hello everyone, I have an ubuntu 20.04 and some disks on an lvm to sum up the capacity, those will be the ones used for Storj. When I try to run the command to set up the node docker returns invalid mount config for type “bind”: bind source path does not exists.
The path exists and is accesible as I copy pasted the path to the node set up command, I thougth that I could be some permissions issue so I checked that but it was okay.
The LVM that host the volume is mounted at startup and into the fstab of the system.
This is my setup up command
docker run --rm -e SETUP=“true”
–mount type=bind,source="/home/jamcom2/.local/share/storj/identity",destination=/app/identity
–mount type=bind,source="/JamCom2files/Storj",destination=/app/config
–name storagenode storjlabs/storagenode:latest

Docker engine
client version 20.10.5
server version 19.0.13

the setup parameter is run first
and then when setup has run once it should never be needed to be run again.

generally it’s a good idea to move the identity to the storagenode folder.
note sure if that might be whats causing it… but maybe

Are you sure there are 6 files here ? The right path could be /home/jamcom2/.local/share/storj/identity/storagenode

Thanks for your answers. I know that the setup command is run the first one and is the point of failure so the node is not setting up. I have changed the identity path to the one suggested without success and also changed the identity folder to the one the node is going to store the data. That has move forward the error now not binding the path in the identity line of the command instead of the data storage line.

Going against the manual I changed the --mount command for the -v command which allows the command to run but without complaints but it doesn’t create the needed folders and the config.yaml file needed for the storagenode operation so another failure.

I am not a docker expert at all but it sounds to me like docker doesn’t like to bind to lvm volumes? or some extra stuff that I don’t know is needed

You will lose your node if you do that. Follow the documentation to the letter.

i doubt that it’s lvm…
i’m not crazy about using a . in the folder name…
seems like one of those edge cases that might not work across platforms, like say windows and since docker is suppose to work on both platforms i would refrain from using paths like that…

this is how my run command looks

docker run -d --restart unless-stopped --stop-timeout 300 -p \
-p -e WALLET="0x111111111111111111111" \
-e EMAIL="" -e ADDRESS="global.ip.inet:28967" \
-e STORAGE="4TB" --mount type=bind,source="/sn3/id-sn3",destination=/app/identity \
--mount type=bind,source="/sn3/storj",destination=/app/config --name sn3 storjlabs/storagenode:latest

might want to remove the --log-opt max-size=1m because thats for an export thing i run on my logs, but i like to keep the native docker log commands so i run it like that, maybe at 10m on the 15tb node tho

–log-opt max-size=1m \

took it out you can add it in if you use it…

to be fair the run command line parameters is a bit of a mouthful, had me working on that for a while to…

maybe an example should be added to the documentation…

Can you show the error?

Thanks nerdatwork, I know that the instructions are there to be followed,I used to have a node running happy during 2020, I made that change following some advice found here that talked about problems with binding in docker Getting invalid mount config for type "bind": bind source path does not exist in docker - Stack Overflow

I was trying stuff, I would of course use --mount when the problem is fixed

1 Like

The problem is not at the run command but the setup of the node itself once I fix the setup I shouldn’t have problems with the run command as it will use the same paths.

Please, show your current docker run for setup, place it between two new lines with three backticks (like these: ```).
Also, please, show result of the command:

ls -l /JamCom2files/
ls -l /home/jamcom2/.local/share/storj/identity

Hi Alexey here are the commands

docker setup

sudo docker run --rm -e SETUP="true" \
    --mount type=bind,source="/home/jamcom2/.local/share/storj/identity/storagenode",destination=/app/identity \
    --mount type=bind,source="/JamCom2files/Storj/Data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

docker run

sudo docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967 \
    -p \
    -e WALLET="0x" \
    -e EMAIL="@" \
    -e ADDRESS="" \
    -e STORAGE="1.3TB" \
    --mount type=bind,source="/home/jamcom2/.local/share/storj/identity/storagenode",destination=/app/identity \
    --mount type=bind,source="/JamCom2files/Storj/Data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

Here is the output for the ls -l commands

ls -l /JamCom2files/ 
total 20
drwxrwxrwx 3 root root  4096 Apr 14 11:45 Storj
drwx------ 2 root root 16384 Mar  6 14:36 lost+found

ls -l /home/jamcom2/.local/share/storj/identity
total 52
-rw-r--r-- 1 jamcom2 jamcom2   558 Mar  7 15:02 ca.1615125777.cert
-rw-r--r-- 1 jamcom2 jamcom2  1088 Mar  7 15:02 ca.cert
-rw------- 1 jamcom2 jamcom2   241 Mar  6 21:39 ca.key
-rw-r--r-- 1 jamcom2 jamcom2  1096 Mar  7 15:02 identity.1615125777.cert
-rw-r--r-- 1 jamcom2 jamcom2  1626 Mar  7 15:02 identity.cert
-rw------- 1 jamcom2 jamcom2   241 Mar  6 21:39 identity.key
-rw------- 1 jamcom2 jamcom2 32768 Mar  7 15:02 revocations.db
drwxr--r-- 2 jamcom2 jamcom2  4096 Mar  7 15:02 storagenode

I see that for the /JamCom2files what I suppose is the owner is the root user, despite this I changed the permissions so that everyone can write and read, also all the docker commands are run with sudo to try to circumvent any problems. Could be a safety issue but because is an old system on its own only for this stuff and isolated I don’t see it as a threat.

docker run --rm -e SETUP=“true”
–mount type=bind,source="/sn03/id-sn03",destination=/app/identity
–mount type=bind,source="/sn03/storj",destination=/app/config
–name sn03 storjlabs/storagenode:latest

only thing i still can spot is that . in .local
that would be my first thing to change is the location of the identity, to /JamCom2files/storj-id/
are you even sure the storagenode has rights to access your home folder?

and i wouldn’t use a . in the name that, last time i tried to use those in file names because a linux guide told me to, it just vanished … not sure what that was about…
but i think . in front of a file or folder might have some special meaning in linux.
like say hiding it or making it only accessible by root.

so let me suggest it again… like i did days ago… move the identity
and if it still gives you grief do a ls -l and maybe chown if the identity isn’t under the same user and group and the rest of the storagenode.

and on another note…

would you make this with out capital letters

when this is without… thats just making stuff painful for yourself because linux treats capital letters as unique letters… which is kinda weird… but i find its a really good idea to stick to a methodology to where or if you use capital letters when stuff simply doesn’t work if one gets them wrong.

this uses the data folder… mine doesn’t

so if you didn’t move around the files from their default locations that would most likely break the bind

Seems your identity located in /home/jamcom2/.local/share/storj/identity and in /home/jamcom2/.local/share/storj/identity/storagenode. I think only one is correct.

Is it actually exist?
Can you do (without sudo):

echo 1 > /JamCom2files/Storj/Data/1.txt
cat /JamCom2files/Storj/Data/1.txt
rm /JamCom2files/Storj/Data/1.txt
1 Like

Hi SGC you are right, on linux the . modifies a folder to hide it. The path to the identity is like that just as a result of the linux commands to generate it. But anyways I have moved everything out from there.

Hi Alexey this is the result of the echo, cat and rm commands

jamcom2@jamcom2:~$ echo 1 > /JamCom2files/Storj/Data/1.txt
jamcom2@jamcom2:~$ cat /JamCom2files/Storj/Data/1.txt
jamcom2@jamcom2:~$ rm /JamCom2files/Storj/Data/1.txt

Looks like the path exists, is accesible and can stand operations on it.

Regarding the identity I have taken the one from /home/jamcom2/.local/share/storj/identity/storagenode and moved it to where the node is going to have all its stuff.

As a result the commands are
docker set up

sudo docker run --rm -e SETUP="true" \
    --mount type=bind,source="/JamCom2files/Storj/ID",destination=/app/identity \
    --mount type=bind,source="/JamCom2files/Storj/Data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

docker run

sudo docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967 \
    -p \
    -e WALLET="0x1024a4498390748D8c3a6797f7413a11AA2B87cD" \
    -e EMAIL="" \
    -e ADDRESS="" \
    -e STORAGE="1.3TB" \
    --mount type=bind,source="/JamCom2files/Storj/ID",destination=/app/identity \
    --mount type=bind,source="/JamCom2files/Storj/Data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

But anyways I just run the set up and the error persists, this is it by the way

jamcom2@jamcom2:~$ sudo docker run --rm -e SETUP="true" \
>     --mount type=bind,source="/JamCom2files/Storj/ID",destination=/app/identity \
>     --mount type=bind,source="/JamCom2files/Storj/Data",destination=/app/config \
>     --name storagenode storjlabs/storagenode:latest
docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /JamCom2files/Storj/ID.
See 'docker run --help'.

Should I delete everything (even docker) and restart from scratch?

then i would rather try to rewrite the command from scratch… i doubt there is anything wrong aside from some minute mistake somewhere.

done my fair share of these docker commands and they can be really tricky sometimes…
i still have some where i never was able to find the mistake… i simply copied a working run command from another of my nodes and adapted that and then it ran just fine…

i stared longer than i care to admit on the command that didn’t work and ever was able to find the error…

this was also why i linked you a template of mine, so you could simply fill in the correct information and try to run that…

it says the ID folder doesn’t exist… so either the path is wrong or the the path is written wrong.

To prevent mistyping I always copy paste the paths, but that is the “funny” thing SGC if I run the Alexey commands without sudo on the ID path that I am using and contains the 6 files needed the result is:

jamcom2@jamcom2:~$ echo 1 > /JamCom2files/Storj/ID/1.txt
jamcom2@jamcom2:~$ cat /JamCom2files/Storj/ID/1.txt
jamcom2@jamcom2:~$ rm /JamCom2files/Storj/ID/1.txt

Looks like docker is trolling me

What it shows:

ls -la /

Could it be that you need sudo inside Docker too to access the paths?