-
Notifications
You must be signed in to change notification settings - Fork 68
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
Unshare fails on nested mounts #19
Comments
The solution in https://stackoverflow.com/questions/67198603/overlayfs-inside-docker-container Fixes the issue.
I am not too sure why we need to place it in tmpfs for it to work in docker. cc @mgree |
I think it's a nesting issue: https://stackoverflow.com/questions/67198603/overlayfs-inside-docker-container#comment123545455_67208735. |
That makes sense, should we work on support for running try in docker/overlayfs? |
I don't think it's a huge priority---if you're running in those environments, you need |
In a setup where we have a
And in dmesg, we see the following
https://elixir.bootlin.com/linux/latest/source/fs/overlayfs/super.c#L1665 |
Reproducible on the following.
|
Mounting the directories via mergerfs to a tempdir, then mounting overlayfs with the tempdir as it's lowerdir seems to be able to fix this. A fix has been pushed to branch nested-mount. Should we work to support nested mounts via mergerfs @mgree |
Is there a reason a simpler, comes-with-default-Linux approach like |
Also: we will very much need tests for this. |
Unionfs works, however on my debian setup it requires the installation of unionfs-fuse package.
I agree we shouldn't add too many dependencies, perhaps we can make it a flag to enable/disable or use it only if merger/unionfs is installed. |
Okay, fair enough. Let's see if we can use the same approach for both, and then we can detect (or have the user select) a union fs to use. |
Great, I'll see to implement this with #45 |
Also should be closed using #67 |
* Allow for nested mount by using mergerfs * Remove debug bash and echo * mount /run with merger aswell * refactor and use overlayfs via mergerfs if regular overlayfs fails * Only mount /dev/{tty null zero full random urandom} * improve docs, refactor from top_dir to mountpoint * Fix mergerfs failing not showing mount log path * Add support for unionfs, allow user to specify unionfs helper path * Write mountpoint on unionhelper not found message * exit if findmnt not installed * nested mount docs * add newlines to readme * grammar fix * Add -U option description to manpages * Add shell completion for -U option * Change -U flag autocompletion to only suggest executables * Install mergerfs in ci * Try reading from /run directory before testing * Refactor and unmount devices for tests to pass * Add a device test * Some comments and redirect a test to /dev/null Fixed #56 #45 #38 #20 #19 --------- Co-authored-by: Eric Zhu <eric@debian-BULLSEYE-live-builder-AMD64> Co-authored-by: gliargovas <gliargovas@aueb.gr> Co-authored-by: Konstantinos Kallas <konstantinos.kallas@hotmail.com> Co-authored-by: Michael Greenberg <michael@greenberg.science>
On a docker container,
--privileged
is required for unshare to work.When running try, mount fails in the overlayfs.
The text was updated successfully, but these errors were encountered: