Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the difference between Filesystem(device location) and Mounted point? Both seems to be directory.

Where does actual data/files of the mounted device reside? in filesystem or mount point?

What is the use of mount point if actual data lives in Filesystem?

#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda1             8256952    970228   7202856  12% /
tmpfs                   308520         0    308520   0% /dev/shm
share|improve this question

migrated from stackoverflow.com Dec 13 '11 at 17:54

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers 3

up vote 2 down vote accepted

A (physical) file system is a disk or partition, formatted in a certain way, and containing data structures comprising directories and files.

Every physical file system has a root directory indicated as / in Linux.

Now this structure maps to a logical view. A simple logical view maps one physical file system one-on-one to your logical file system. This is called 'mounting a file system'.

You can mount a physical file system (or part of it) to a different logical node, called a 'mount point'. This means, your physical file system root / can be mounted to your logical "directory" /my/logical/mount.
If your physical file system contains a file rootfile in its physical root directory, you may access exactly that file by its logical name /my/logical/mount/rootfile.

The physical location is still on the physical file system, your access through the "mount point" is just a logical link to access that data.

Mount are useful for organizing various file systems, for combining several disks/partitions into one logical structure, and to combine various disparate devices and views into the same structure, from disks, partitions, USB sticks, floppy drives, remote network drives and even terminals, all logically residing under your logical root /.

share|improve this answer
    
thanks. can i mount different physical devices to the same mount point? –  P K Dec 12 '11 at 20:48
    
Not the same, but in parallel. A mount point identifies the (file system) driver and the exact drive/partition/location, of which there can only be one per mount point. But something like /dev/hd0 and /dev/hd1 can be two drives in your system. You can mount one drive/partition in two different locations, possibly one as read-only, one as writable, though. –  Johan Bezem Dec 12 '11 at 20:50
    
i got it, one last question. suppose /dev/xvda1 is mounted on mount point '/', you can see in question. As i understand any file under physical media /dev/xvda1 can be accessed by /A correct? At the same time can i access it like /dev/xvda1/A –  P K Dec 12 '11 at 20:56
    
Theoretically, yes. However, / is a special case, since it is the root of your logical world and doesn't have a name. A mount point has a name like 'm1' or 'dev', and the logical root ties all "first level" mount points together. If you want to go into details, you may need someone else to answer your questions, my experience in this is quite dated, even if the basics still apply. –  Johan Bezem Dec 12 '11 at 21:02
    
but xvda1 is listed as brw-rw---- 1 root disk 202, 1 Dec 1 14:49 xvda1, in dev directory and i can't see it as its not a directory. so i guess /A is only option –  P K Dec 12 '11 at 21:05
show 1 more comment

You mount a file system on a mount point.

A file system basically tells you how stuff is laid out on the underlying (physical) medium, while the mount point gives the path to where the information from the file system will be accessible later.

share|improve this answer
add comment

Filesystem refers to the actual device holding the data. Mount is a logical concept of mapping of a filesystem device to a path.

share|improve this answer
    
What is the use of mount point if actual data lives in Filesystem? –  P K Dec 12 '11 at 20:38
1  
It's an abstraction. For example, each user on a linux machine could choose to mount the same physical disk to a different path. –  TJD Dec 12 '11 at 20:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.