I installed new Fedora OS on SSD last year, my old HOME directory on HDD were leaved there until now.

Recently, I want to combine the new HOME directory and old HOME directory into a merged HOME directory, so that I can have one view of my HOME directories to make life easier.

After read some articles and check available packages in Fedora, I choose overlayfs to do that. However, one day later, I found lots of duplicated files and directories occured in $upperdir (which is the new HOME directory on SSD), these files and directories are from $lowerdir (which is the old HOME directory on HDD). These files are usually text files (.txt .sh .html etc...) and media files (.wav .mp3 .png .jpg etc...)

I'm aware of copy-on-write is a feature of overlayfs , but I didn't modified these text files or media files, I didn't opened them either. Currently, I'm using Fedora 32 MATE. After some tests, I noticed that if I opened a text file in $merged directory using leafpad editor, a duplicated file will occurs in $upperdir, but NO, I didn't make any modification and I didn't touch other text files or media files.

Testing script


set -x
mkdir -p /tmp/dir_{m,u,l1,l2,w}
echo upper > /tmp/dir_u/upper.txt
echo lower1 > /tmp/dir_l1/lower1.txt
echo lower2 > /tmp/dir_l2/lower2.txt
cp -p /usr/share/backgrounds/default.png /tmp/dir_l1/
cp -p /usr/share/sounds/alsa/Noise.wav /tmp/dir_l2/
cp -p "$0" /tmp/dir_l2/

sudo mount -t overlay overlay -o lowerdir=/tmp/dir_l1:/tmp/dir_l2,upperdir=/tmp/dir_u,workdir=/tmp/dir_w  /tmp/dir_m
caja /tmp/dir_m


  1. Why these text files (.txt .sh .html etc.) and media files (.wav .mp3 .png .jpg etc.) are duplicated in upperdir without modification ?
  2. If I didn't touched these files, then which application(s) in MATE desktop touched these files? I suspect it may related to caja file manager or other applications that will scan all files deeply to generate thumbnail images, but I'm not sure. And, scan is a read operation, not write, right?

By the way

I had switched to mergerfs when I encountered this issue, still testing, but it seems is the right way to go.

And, I spend a lot of time to delete the duplicated files, carefully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.