1

I just tried to mount two folders in one using aufs on Debian 7 wheezy. The command I issued is the following:

mkdir /test1
mkdir /test2
mkdir /test
mount -t aufs -o dirs=/test1:/test2 none /test

Then I wanted to see if files with the same name would conflict in the same folder, so I issued this:

touch /test1/file1.txt
touch /test2/file1.txt

echo "A" >/test1/file1.txt
echo "B" >/test2/file1.txt

The result is that /test contains only file1.txt containing the letter "B" (which means it is the file1.txt contained in /test2). How can the files not conflict? And which criteria does aufs use to choose which file to show if they have the same name?

1 Answer 1

2

Each underlying filesystem is assigned a precedence. If there are duplicate filenames, the one from the higher precedence filesystem is the visible one, the others are hidden.

See https://superuser.com/questions/326190/how-does-unionfs-work

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .