Hi,
We are using an overlayfs to make our configuration persistent.
The lower dir is /etc and the upper dir is located on the persistent
/data partition. This is the mount command we use to create the overlay:
mount -n -t overlay \
-o workdir=$WORK_DIR \
-o lowerdir=/etc \
-o upperdir=/data \
-o index=off,xino=off,redirect_dir=off,metacopy=off \
/data /etc
Problem is that when we do remove a file from
the lower dir ("rm /etc/file1.txt" for example) and afterwards list the
directory content with the
ls command we do get following output:
$ls /etc
file1.txt file2.txt file3.txt
$rm /etc/file1.txt
$ls /etc
ls: ./file1.txt: No such file or directory
file2.txt file3.txt
Like expected, the file is not listed anymore but we do get an error
message ("No such file or directory"). When we list the directory
using the tree command we do not get an error but the file (possibly the
character device to white out the deleted file?) still gets listed in
the
output contrary to what we would expect.
We are using linux kernel version 5.10.9.
Any hint on why this does happen or how to solve this would be very
appreciated.
Kind regards,
Alexis