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

  • Thread starter Thread starter Eus
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 12K views
Eus
Messages
93
Reaction score
0
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?

Regards,
Eus
 
Physics news on Phys.org
Eus said:
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?

Regards,
Eus

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.

Cheers

Aquafire
 
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.


Eus
 
Eus said:
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?

Regards,
Eus

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.
 
And also why did you ask if there is a good reason if you appear to already know?
 
octelcogopod said:
And also why did you ask if there is a good reason if you appear to already know?

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.


Eus