Skip to content

Overlayfs mounts silently ignore bind mounts from the lowerdir #3543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Lindenk opened this issue Apr 23, 2025 · 3 comments
Open

Overlayfs mounts silently ignore bind mounts from the lowerdir #3543

Lindenk opened this issue Apr 23, 2025 · 3 comments

Comments

@Lindenk
Copy link

Lindenk commented Apr 23, 2025

It looks like if a directory is has bind mounted children, they are silently ignored when the directory is used as a lowerdir in an overlayfs mount

Here's a minimal example:

mkdir a b b/z c d workdir
touch a/1 b/2 c/3
mount -o bind a b/z
mount -t overlay overlay -o lowerdir=b,upperdir=c,workdir=workdir d
ls d # returns "2 3 z" as expected
ls d/z # empty instead of "1" as expected. It isn't reading from "a"
@Lindenk Lindenk changed the title Overlayfs mounts silently ignore bind mounts from the lowerdir Overlayfs mounts silently ignores bind mounts from the lowerdir Apr 23, 2025
@Lindenk Lindenk changed the title Overlayfs mounts silently ignores bind mounts from the lowerdir Overlayfs mounts silently ignore bind mounts from the lowerdir Apr 23, 2025
@karelzak
Copy link
Collaborator

I have doubts that this is a mount(8) issue; you need to discuss it with Linux kernel developers. mount(8) just sends the options to the kernel and does not interpret them.

@RushingAlien
Copy link

overlayfs just doesn't share submounts of a lowerdir, this is behaviour from the kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants