Linux docker mount

Error received when running below command :

sudo docker run --rm -e SETUP=“true” --mount type=bind,source="~/.local/share/storj/identity/storagenode",destination=/app/identity --mount type=bind,source=/dev/sda2,destination=/app/config --name storagenode storjlabs/storagenode:latest

docker: Error response from daemon: invalid mount config for type “bind”: invalid mount path: ‘~/.local/share/storj/identity/storagenode’ mount path must be absolute.

My hunch is Docker needs the absolute path rather than the home (~) shortcut.

Big thanks!

So I’ve updated my command such that has the absolute path and get this error :

failed to check for file existence: stat config/config.yaml: not a directory

You need to mount your disk to the folder first, see How do I setup static mount via /etc/fstab for Linux? - Node Operator
Then use the mount point in your docker run command instead of /dev/sda2
Please, show result of the command:

sudo blkid

/dev/sda2: UUID=“90dafb81-7be2-4ec0-8c5a-ae8eef53b763” TYPE=“ext4” PARTUUID=“14063b45-9692-4198-9e9e-d9d11ab7a552”

Ok, good. At least it’s ext4.
Please, mount it to the some folder, /mnt/storj for example, then run the setup.

Big thanks!

It worked.

1 Like
CONTAINER ID   IMAGE                          COMMAND         CREATED          STATUS          PORTS                                                                                                                      NAMES
XXXXXXXXXXXX   storjlabs/storagenode:latest   "/entrypoint"   10 minutes ago   Up 10 minutes   127.0.0.1:14002->14002/tcp, 0.0.0.0:28967->28967/tcp, 0.0.0.0:28967->28967/udp, :::28967->28967/tcp, :::28967->28967/udp   storagenode

Although when checking my dashboard via command line, I get this :

Storage Node Dashboard ( Node Version: v1.42.4 )

======================

ID hdflkz.vn.zljfp19
Status OFFLINE
Uptime 33m5s

                               Available     Used     Egress     Ingress

Bandwidth N/A 0 B 0 B 0 B (since Nov 1)
Disk 550.00 GB 0 B
Internal 127.0.0.1:7778
External MY_PUBLIC_IP:28967