I'd like to request the community's help in understanding the *nix concept of "mount points" versus folders. I've tried to do background reading such as this, this, and this, among others, but the concept is still fuzzy to me. I will try to ask this question such that it is not a duplicate of the first link.
Disclosure: my computing foundation has been almost entirely in a DOS/Windows environment, likely contributing to my difficulty understanding this.
First question: what is a mount point? (I've read various explanations of what it is, maybe the one given in answer to this will make the difference).
I'd like to work with a specific example, too. The following output is from a Linux box I work with:
>df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/fedora_localhost-root 239727136 215317088 12209500 95% / devtmpfs 8145236 0 8145236 0% /dev tmpfs 8166384 160 8166224 1% /dev/shm tmpfs 8166384 796 8165588 1% /run tmpfs 8166384 0 8166384 0% /sys/fs/cgroup tmpfs 8166384 76 8166308 1% /tmp /dev/sda1 487652 150127 307829 33% /boot >ls -l /dev/mapper/fedora_localhost-root lrwxrwxrwx 1 root root 7 Jan 3 18:12 /dev/mapper/fedora_localhost-root -> ../dm-0 >ls -l /dev/dm-0 brw-rw---- 1 root disk 253, 0 Jan 3 18:12 /dev/dm-0
Let me try verbalize my tenuous understanding, and perhaps answerers can then understand and correct my misunderstandings
From my readings, I think Linux "makes physical devices like hard-drives available as 'block devices' which look like files located somewhere under /dev", e.g.
/dev/dm-0. Is this correct?
From my readings, my understanding is that a "mount point" is like the "topmost directory" of a given partition, something like
D:\ in DOS terminology. Is that right?
One thing I don't get, then: my example shows
/dev/dm-0 "mounted on"
/. But isn't
/ the "topmost directory"? I mean every accessible folder is necessarily some subfolder of
/ isn't it? E.g.
/var, etc. are all folders "under"
/ because they're prefixed by
/, right? What I'm getting at is: if my understanding that "a mount point is like the topmost directory of a given partition" is correct, how could you ever have more than one mount point, since the very topmost mount point
/ is already used up?
Related to the above paragraph:
/dev/dm-0 is itself a subfolder of
/. So I'm not clear how the mount point
/ can be the entry point to something that it's own subfolder? Something seems circular about this, and I don't understand this.
Lastly, can someone explain the difference between a mount point and a subfolder? One of the articles I read says
/boot are all mount points. So what then is the difference between
/home being a mount point versus if I had executed
Thanks for any help. I'm all kinds of dazed and confused about this.