2

Suppose some commands below:

mkdir -p /tmp/rootfs

mkdir -p /tmp/rootfs1

mkdir /mnt

mount -n -t overlayfs -o rw,upperdir=/tmp/rootfs,lowerdir=/tmp/rootfs1 none /mnt

As a result, I can see everything of /rootfs and /mnt/rootfs1 in /mnt. Besides, when I add something in /mnt, I can see them in /tmp/rootfs, but can't see them in /tmp/rootfs1. What's more, if I delete something in /mnt, it would be deleted in all of the directories. I wonder why? I want to know the relationship between /tmp/rootfs, /tmp/rootfs1 and /mnt.

PS: I am not satisfied with the answer here, How do I use OverlayFS?

user2886717
  • 131
  • 4
  • Interesting question! Could you rewrite it a little to make the actual question more clear/stand out? (It took me some seconds to get the 'I wonder why?') – Volker Siegel Apr 30 '14 at 13:00

0 Answers0