Understanding file systems and mount points as seen from df and Nautilus

filesfilesystemsmount

Let's say we run df command to show something about file system in my CentOS.

enter image description here

I can see a LVM /dev/mapper/vg_centos64-lv_root mount to /. or a partition /dev/sda1 mount to /boot, and a device CDROM /dev/sr0 mount to media/CentOS_6.5_Final.

And I can see them(filesystem) in the Nautilus. They either looks like a file or directory. Please looks below.

enter image description here
enter image description here

For my point of view. It is really confused that blending all the things(I mean the thing like partition sda1 and the things like device sr0) into the filesystem. And what the Mount doing looks like pointing a "file" to another "directory". So It really looks like that the same thing has 2 addresses to be accessed. Why does the Linux file system design like this? And Please correct me if there is something wrong with what I thought. Thanks.

I Also want to know Whether I should access from the file system or Mount point if I want? Because both are pointing to the same things.

Best Answer

In Unix everything is a file.

These files are organized in a tree structure, beginning at the root /.

Your filesystem or filesystems will then be mounted at the appropriate places in your / according your /etc/fstab file. This file contains information about your filesystems, which device they belong to and to which point they will get mounted to - the mountpoint.

Thats the "mount concept".

It is not limited to disks and other blockdevices, here are some examples involving mount:

- Mount a representation of your running kernel under /proc
- Mount a special log partition (other device, "logfriendly" filesystem) under /var/log
- Install different systems and mount just one home directory
- Mount remote directories for example via NFS to your system
- Mount a image of a cd to a specific directory

More about this topic you can find at the following url: - http://ultra.pr.erau.edu/~jaffem/tutorial/file_system_basics.htm

Related Question