For the easy stackable filesystem OverlayFS you have to prepair:
- Lower folder (Where the source files are), can be and will be read only
- Upper folder (This will cover the source files), will hold everything you write
- Merge folder (The path for your project), empty
- Work folder (Application internals, nothing for the user)
As an example: mount the folder "/tmp/ov/up" over "/tmp/ov/low" at "/tmp/ov/merge":
sudo mount -t overlay overlay -o lowerdir=/tmp/ov/low,upperdir=/tmp/ov/up,workdir=/tmp/ov/work /tmp/ov/merge
Result:
tree -ap /tmp/ov/ /tmp/ov/ ├── [drwxr-xr-x] low │ ├── [-rw-r--r--] test2 │ └── [-rw-r--r--] test3 ├── [drwxr-xr-x] merge │ ├── [-rw-r--r--] test1 │ ├── [-rw-r--r--] test3 │ └── [-rw-r--r--] test4 ├── [drwxr-xr-x] up │ ├── [-rw-r--r--] test1 │ ├── [c---------] test2 │ ├── [-rw-r--r--] test3 │ └── [-rw-r--r--] test4 └── [drwxr-xr-x] work └── [d---------] work [error opening dir]
File "up/test2" is a special charakter file (c) which is used as internal note to hide "low/test2" because it is marked as deleted.
More
(Edited 18-07-19)
Comments