Skip to content

[Bug]: Extra filesystem ignored as duplicate due to Docker automatic bind mounts #1878

@Rindlavesh

Description

@Rindlavesh

Welcome!

  • I have read the Documentation
  • I have checked the Common Issues Guide and my problem was not mentioned there.
  • I have searched open and closed issues and my problem was not mentioned before.
  • I have verified I am using the latest version available. You can check the latest release here.

Component

Agent

Problem Description

I'm unable to get one of my extra-filesystem disks to display properly. I found some issues that appear to be related to mine, but I think this is different enough to post. I've used AI to summarize my problem below:

When adding a second extra-filesystem with LVM device is the same as the one Docker uses for its automatic system bind mounts (/etc/resolv.conf, /etc/hostname, /etc/hosts), the extra filesystem is silently dropped with "Ignoring duplicate FS" and never appears in the UI.

I'm on a UGREEN DXP4800 Pro running UGOS Pro, /etc/resolv.conf, /etc/hostname, and /etc/hosts are all on the same LVM-on-RAID device as /volume2. Docker automatically bind-mounts these files into every container, so Beszel finds that device via the system files first. When it then processes the explicit /volume2 extra-filesystem entry, it treats it like a duplicate and discards it.

Volume1 works fine because its LVM device is different from the one backing the system files.

Expected Behavior

System bind mounts like /etc/resolv.conf, /etc/hostname, and /etc/hosts should not be considered when deduplicating extra-filesystem entries. Only root and explicitly declared extra-filesystem mounts should participate in duplicate detection.

Steps to Reproduce

  1. Have a NAS or server where /etc/resolv.conf, /etc/hostname, and /etc/hosts reside on an LVM-on-RAID volume (e.g. UGREEN DXP4800 Pro with UGOS Pro)
  2. Deploy beszel-agent as a Docker container
  3. Add that same LVM volume as an extra-filesystem mount in the compose config
  4. Start the agent and check logs. The extra filesystem is detected then immediately dropped with Ignoring duplicate FS
  5. Volume does not appear in Beszel UI, even though it's being correctly detected

OS / Architecture

linux/amd64 (agent), linux/amd64 (hub)

Beszel version

0.18.6 (also tested on beszel-agent:dev but the issue persists)

Installation method

Docker

Configuration

beszel-agent:
  image: henrygd/beszel-agent
  container_name: Beszel-Agent
  network_mode: host
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /volume1/docker/beszel-agent:/var/lib/beszel-agent
    - /volume1/.beszel:/extra-filesystems/md1__Volume1:ro
    - /volume2/.beszel:/extra-filesystems/md2__Volume2:ro
  environment:
    LISTEN: 45876
    FILESYSTEM: /dev/sda1

Hub Logs

n/a

Agent Logs

INFO Detected disk name=Volume2 device=/dev/mapper/<lvm-device> mount=/extra-filesystems/md2__Volume2 io=md2 root=false
INFO Ignoring duplicate FS name=md2 mount=/extra-filesystems/md2__Volume2
DEBUG Extra FS data=map[Volume1:0x...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Bug backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions