Score:0

docker bind mounts sometimes empty

io flag

I am using a docker container with this definition:

  webserver:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    volumes:
      - /srv/dev-disk-by-id-ata-Micron_1100_MTFDDAV256TBN_17501A32891E-part3/dockerconfig/paperless/data:/usr/src/paperless/data
      - /srv/dev-disk-by-label-DataPool1/Paperless/paperless_ng_media:/usr/src/paperless/media
      - /srv/dev-disk-by-label-DataPool1/Paperless/export:/usr/src/paperless/export
      - /srv/dev-disk-by-label-DataPool1/Paperless/consume:/usr/src/paperless/consume

Sometimes, unfortunately, the content of /usr/src/paperless/media inside the container is empty. All files created now endup inside the container and not in the bind mount.

Restarting the container usually helps. I have not observed any errors in journalctl -u docker docker inspect correctly shows:

        "HostConfig": {
            "Binds": [
                "/srv/dev-disk-by-label-DataPool1/Paperless/paperless_ng_media:/usr/src/paperless/media:rw",
                "/srv/dev-disk-by-label-DataPool1/Paperless/export:/usr/src/paperless/export:rw",
                "/srv/dev-disk-by-label-DataPool1/Paperless/consume:/usr/src/paperless/consume:rw",
                "/srv/dev-disk-by-id-ata-Micron_1100_MTFDDAV256TBN_17501A32891E-part3/dockerconfig/paperless/data:/usr/src/paperless/data:rw"
            ],

There is not much special with the folder /srv/dev-disk-by-label-DataPool1/Paperless/paperless_ng_media except that it is a btrfs subvolume:

/dev/sdc1 on /srv/dev-disk-by-label-DataPool1 type btrfs 
/dev/sdc1 on /srv/dev-disk-by-label-DataPool1/Paperless type btrfs (rw,noatime,space_cache=v2,subvolid=1385,subvol=/Paperless)```

I am out of ideas..
Do you have any?

Best regards,
Hendrik
mmv-ru avatar
hu flag
Just guesses, there no permissions or Selinux (or Apparmor) problem?
henfri avatar
io flag
The problem is coming (without container restart) and going (with container restart). So, it cannot be permissions. How would I track town Selinux or Apparmor problems?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.