Failure in Merging Directories Located Under the Same OverlayFS Mountpoint
- Dominant language
- Shell
- Stars
- 5.5k
- Forks
- 81
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
When attempting to merge two directories residing under the same overlayfs mountpoint within try, the operation fails, rendering the common directory unmountable within try.
#### Error Reproduction:
```ShellSession
$ ./try -D sandbox1 "echo foo > file.txt"
...
$ ./try -L sandbox1 "cat file.txt"
...
try(/tmp/tmp.VwOWiakeQW): Warning: Failed mounting /users as an overlay and mergerfs or unionfs not set and could not be found, see "/tmp/tmp.B3jpnj64oq"
/tmp/tmp.LyCvWjVjEY: 7: cd: can't cd to /users/gliargko/try
```
Error log displays:
```
mount: /tmp/tmp.NSMc55yqg2/temproot/users: mount(2) system call failed: Too many levels of symbolic links.
```
`dmesg` output:
```log
[ 2107.018994] overlayfs: fs on 'sandbox1/upperdir/users' does not support file handles, falling back to xino=off.
[ 2107.019006] overlayfs: overlapping lowerdir path
```
Installing `mergerfs` solves the issue.
* The initial mount failure is due to overlayfs's inability to handle overlapping directories. What causes these overlaps?
* It seems like `mergerfs` resolves this as it effectively manages overlapping paths, allowing the directories to merge seamlessly. Why isn't overlayfs enough?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.