I try a simple overlay example by mounting: sudo mount -t overlay -o lowerdir=/tmp/lower,upperdir=/tmp/upper/upper, workdir=/tmp/upper/workdir none /tmp/overlay
(I run the full script from example in : https://blog.programster.org/overlayfs)
The mount is successful:
/tmp/lower-fs.img on /tmp/lower type ext4 (ro)
/tmp/upper-fs.img on /tmp/upper type ext4 (rw)
none on /tmp/overlay type overlay
(rw,lowerdir=/tmp/lower,upperdir=/tmp/upper/upper,workdir=/tmp/upper/workdir)
Yet, I get error on trying to write into the readonly and overlayed area:
echo "hello world" >> /tmp/lower/lower-file.txt
bash: /tmp/lower/lower-file.txt: Read-only file system
I use the following kernel:
$ uname -a
Linux user-VirtualBox 4.4.50-040450-generic #201702181144 SMP Sat Feb 18
16:45:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Thanks for any idea