LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Devices/file system on linux (https://www.linuxquestions.org/questions/linux-newbie-8/devices-file-system-on-linux-4175411417/)

hari_sahaya 06-14-2012 07:08 AM

Devices/file system on linux
 
Hi,

I am trying to understand the device naming conventions in Linux. Looking for some information on mount points.
If someone can elaborate or direct me to some pointers/weblinks, it would be very helpful.

Thanks!

MensaWater 06-14-2012 08:34 AM

The document here will give you a good overview for mount points (filesystems).
http://www.pathname.com/fhs/pub/fhs-2.3.pdf

Note that "mount point" and "device" are separate things when talking about filesystems.

mount point = The directory you mount the device on and from which you access the files in the filesystem. When the filesystem is NOT mounted this directory exists but is mostly empty (it should have only the . and .. hard links in it to pwd and parent directory). The one filesystem all UNIX/Linux systems will always have is "/" (root). There may or may not be others.

device = The partition, logical volume or media (e.g. usb or DVD) you mounted on the mount point. Examples would be /dev/sda2 for the second partition of your first hard drive, /dev/VolGroup03/lvol4 for the 4th logical volume of the 3rd volume group).

When you run df -hP you see the device in the left column and the mount point in the last column.

Note also that there are pseudo filesystems that are created at each boot (e.g. /proc, /sys on Linux with kernel 2.6 and greater).

pixellany 06-14-2012 09:08 AM

A "mount point" is the same thing as a directory---the only difference is how it is used.

try this:

create a new directory (anywhere), called testdir and copy some files into it.
In the parent directory, do "ls testdir" and you will see a list of the files.
now, "mount" some other directory to the new one. eg "somedir" mounted to "testdir":
mount <path>somedir testdir
now, do "ls testdir", and you will see the contents of "somedir" The orignal contents of "testdir" are still there, but are hidden by the mounted directory. If you unmount somedir, then the original contents will reappear.

DavidMcCann 06-14-2012 10:57 AM

Let's have another go at explaining.

Linux, unlike Windows, keeps a single filing system: you don't have to keep track of c:, d:, e:, etc. The mount point is the place in the filing system used for a particular device. So, on my desktop
/dev/sda1 [first hard drive, first partition] is mounted at /
/dev/sda2 [first hard drive, second partition] is mounted at /home
/dev/sda3 [first hard drive, third partition] is mounted at /media/guest
and when I plug in a USB memory stick, I get
/dev/sdb1 mounted at /media/usb

Where things go in /media depends on your distribution, but you can fix it by altering /etc/fstab.

abhiionweb 06-14-2012 11:00 PM

I think you should try these link also along with the links and suggestions of other users :

http://lowfatlinux.com
http://lowfatlinux.com/linux-files.html
http://lowfatlinux.com/linux-filenames.html

Boob helps you lot!! :-)


All times are GMT -5. The time now is 09:41 AM.