Created
June 17, 2021 00:38
-
-
Save sipsma/49b82b3dd0103123c0850aeac926c2d4 to your computer and use it in GitHub Desktop.
whiteout test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@host:~/ovl# ls | |
root@host:~/ovl# mkdir layerA layerB layerC work mnt | |
root@host:~/ovl# touch layerA/a layerB/b layerC/c | |
root@host:~/ovl# mount ovl -t overlay -o lowerdir=layerA,upperdir=layerB,workdir=work mnt | |
root@host:~/ovl# ls -la mnt | |
total 8 | |
drwxr-xr-x 1 root root 4096 Jun 16 17:32 . | |
drwxr-xr-x 7 root root 4096 Jun 16 17:32 .. | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 a | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 b | |
root@host:~/ovl# rm mnt/a | |
root@host:~/ovl# umount mnt | |
root@host:~/ovl# ls -la layerB/ | |
total 8 | |
drwxr-xr-x 2 root root 4096 Jun 16 17:32 . | |
drwxr-xr-x 7 root root 4096 Jun 16 17:32 .. | |
c--------- 2 root root 0, 0 Jun 16 17:32 a | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 b | |
root@host:~/ovl# mount ovl -t overlay -o lowerdir=layerB:layerC mnt | |
root@host:~/ovl# ls -la mnt | |
total 8 | |
drwxr-xr-x 1 root root 4096 Jun 16 17:32 . | |
drwxr-xr-x 7 root root 4096 Jun 16 17:32 .. | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 b | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 c | |
root@host:~/ovl# umount mnt | |
root@host:~/ovl# mount ovl -t overlay -o lowerdir=layerC:layerB mnt | |
root@host:~/ovl# ls -la mnt | |
total 8 | |
drwxr-xr-x 1 root root 4096 Jun 16 17:32 . | |
drwxr-xr-x 7 root root 4096 Jun 16 17:32 .. | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 b | |
-rw-r--r-- 1 root root 0 Jun 16 17:32 c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment