22

Or does it overwrite the existing data in the mountpoint? Or is it just un-accessible?

theTuxRacer
  • 16,185
  • 1
    Mounting a filesystem won't "overwrite" anything (it's not a file copying or moving scheme just presenting another filesystem within the filesystem namespace at a given point) just maybe make it impossible to access the old content till you umount. With some tricks you can even access the old data "behind" the mounted filesystem without umount'ing your fs, with VFS binds, etc. – LGB Mar 09 '11 at 16:24

1 Answers1

31

No it does not have to be an empty directory. You can "overmount" it, but be aware, that you hide the files originally in that directory.

This can lead to some confusion since the space on the underlying filesystem - not the newly mounted one - stays occupied.

ddeimeke
  • 3,089