Accessing bind mount in lower layer via overlayfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I was wondering if it was possible for the bind mounts created under a
lower layer to be exposed via overlayfs?

I have attached a test script that reproduces what I'm trying to achieve:
$ unshare --user --map-root-user --mount bash -xe mount-test
+ mkdir -p real/usr/lib
+ touch real/usr/lib/foo

+ mkdir -p stage/input
+ mount --bind real stage/input <-- I want to mount `real` under `input`.
+ ls -l stage/input
drwxr-xr-x 3 root root 4096 Mar 12 11:53 usr <-- `usr` is visible.

+ mkdir work upper merged
+ mount -t overlay overlay
-olowerdir=./stage,upperdir=./upper,workdir=./work ./merged
+ ls -Rl merged/input
merged/input:
total 0 <-- The `usr` directory is not passed through.

I wasn't able to find anything that explicitly states it's not
supported. Is something like this possible? I tried setting the mount
propagation to shared, but that didn't have any effect.

Thanks,
Raul

Attachment: mount-test
Description: Binary data


[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux