rclone mount files doesn't show up in the named volume

Hello Balena!

Thanks for an awesome ecosystem.

I have been diving into how I could sidecar a container that runs rclone mount towards a S3 bucket. As I understand it rclone mount creates a FUSE inside the container, and in fact I see it created. This is a cat /proc/mounts output inside the container: /orders:brp-machine-configurations-dev/orders /data/orders fuse.rclone rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other 0 0 and /dev/sda5 /data/orders ext4 rw,relatime 0 0 going into the container, doing a list of the files do see the mounted files.

In my docker-compose I do the following to make that volume available:

  rclone-orders:
    build: ./rclone
    volumes:
      - orders:/data/orders:rshared
    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse:/dev/fuse
    restart: unless-stopped
    security_opt:
      - apparmor:unconfined

volumes: 
  orders:

This is primarily inspired by the following: Install . However I can’t figure out how to do the following in balenaEngine:

--volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro

The rshared on the volume I thought did some magic of bind propagation, so sharing all the mounts on the directory. I also tried shared but without success. Does balenaEngine not support bind propagation, and is the rshared just ignored?

This is a balena volume inspect of the volume:

[
    {
        "CreatedAt": "2023-04-27T17:45:17Z",
        "Driver": "local",
        "Labels": {
            "io.balena.app-uuid": "02aa3d7b3417471eb5184aefe758f591",
            "io.balena.supervised": "true"
        },
        "Mountpoint": "/var/lib/docker/volumes/2041569_orders/_data",
        "Name": "2041569_orders",
        "Options": {},
        "Scope": "local"
    }
]

Going into the mountpoint and trying to list them, does not show the files.

I have searched the forums:

and

but nothing goes into details.

Any ideas why this doesn’t work? I believe I have followed what the different blog posts say. I’m sort of in the dark. Is this just not supported, or am I missing some details?

Thanks in advance, and thanks for an awesome product.

1 Like