The fstab is a link to the next fstabB file:
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 ro,noauto 0 1
proc /proc proc defaults 0 0
/dev/mmcblk0p10 /data ext4 defaults 0 0
overlay / overlay
lowerdir=/,upperdir=/data/rfs_overlay,workdir=/data/rfs_overlay_work 0 0
the overlay does not take effect using the fstab and the mount command output does no contain any overlay line.
I tried changing the fstab line to :
# <file system> <mount pt> <type> <options> <dump> <pass>
overlay /data/rfs_overlay overlay
lowerdir=/,upperdir=/data/rfs_overlay_upper,workdir=/data/rfs_overlay_work 0 0
Then, I get that line from the mount
command :
overlay on /data/rfs_overlay type overlay
(rw,relatime,lowerdir=/,upperdir=/data/rfs_overlay_upper,workdir=/data/rfs_overlay_work)
However, when i try to create test.txt file in the rootfs I get the folowing resopnse:
touch test.txt
touch: test.txt: Read-only file system
It is to be noticed that if I change the rootfs to rw and than create the file on the rootfs, the file is created both in the roofs and in the overlay:
mount -o remount,rw /
touch test.txt
find / -name test.txt
/data/rfs_overlay/root/test.txt /root/test.txt