Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

In what case will you mount a filesystem in a non-empty directory?

  1. Sep 17, 2007 #1


    User Avatar

    Hi Ho! :smile:

    I just wonder in what case we want to mount a filesystem in a non-empty directory.
    Mounting a filesystem in a non-empty directory will cause the content of the directory to be inaccessible. So, is there any good reason to do that?

  2. jcsd
  3. Sep 17, 2007 #2
    Two points.

    1.Technically speaking, nothing is inaccessible.

    2. re any good reason to do that ?... none that I can think of, other than wasting time.


  4. Mar 22, 2008 #3


    User Avatar

    Hi Ho!

    One reason to mount a file system on a nonempty directory is when the whole content of the directory will be rendered useless with the content of the file system to be mounted. For example, a DVD contains four ISO9660 image files of four different titles of games has been mounted under /mnt/dvdrom. To play a game, the ISO9660 image of the game must be mounted first so that its content can be read. Because only one game can be played in a PC, there is no need to mount the image in another mount point. Instead, the image is also mounted under /mnt/dvdrom, hiding the file system of the DVD whose content is not needed to be directly accessible in user space. This design will also allow the use of a friendly menu by which the user can select which game to run. Since the user who executed the menu can mount the DVD under /mnt/dvdrom, the menu can also mount the selected image file under /mnt/dvdrom. This will eliminate the need of asking the user to which mount point the user has permission to mount the selected image file.

    Best regards,
  5. Mar 22, 2008 #4


    User Avatar
    Gold Member

    Thats not true. Don't you ever mount file systems to your home dir? Like iso images, network shares, etc. Does the contents of your home dir then become inaccessible? No.
  6. Mar 25, 2008 #5
    And also why did you ask if there is a good reason if you appear to already know?
  7. Mar 25, 2008 #6


    User Avatar

    Because when I asked it for the very first time (09.17.07), I didn't know the reason.
    But, I encountered a case where I would like to mount a filesystem in a non-empty directory.
    So, I wrote the reason here on 03.22.08 to let others know.

    Best regards,
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook