2

I was reading this question: Access to original contents of mount point

and it raised a question for me:

When saving a new file under a point where a drive has been mounted with the --bind option that contains both original files and files on the mounted drive, where is this new file saved? Is it saved to the mounted drive, or in the original location?

1 Answers1

1

Why don't you try it out? Bind-mount a directory, create a file, then unmount. You will see that the file was created on the original directory.

mkdir bindmount
mkdir origin
sudo mount --bind origin bindmount
touch bindmount/myfile
sudo umount bindmount
ls -l bindmount
ls -l origin
berndbausch
  • 3,557