{"id":46,"date":"2017-10-06T17:55:05","date_gmt":"2017-10-06T17:55:05","guid":{"rendered":"http:\/\/pipeawk.com\/?p=46"},"modified":"2017-10-16T12:32:25","modified_gmt":"2017-10-16T12:32:25","slug":"the-unix-mount-point","status":"publish","type":"post","link":"https:\/\/pipeawk.com\/index.php\/2017\/10\/06\/the-unix-mount-point\/","title":{"rendered":"The UNIX Mount Point"},"content":{"rendered":"<p>You have probably heard the term &#8220;<strong>mount-point<\/strong>&#8221; and wondered, or maybe not. You know it&#8217;s there, and files are in it, but you don&#8217;t know what it is? If this is the case then read this article&#8230;<\/p>\n<p>I am assuming that you know what a file and\/or a directory is, a directory is also called a folder. Well, a mount-point is simply the directory or file for which e device, normally a disk, either local or remote, is exposed to the system for interaction. Let&#8217;s take a common Linux system for example, this particular system is a CentOS, but it should not matter which system or UNIX type it is.<!--more--><\/p>\n<p>At the root &#8220;\/&#8221; of your system we have the following files and directories:<\/p>\n<blockquote>\n<pre>lrwxrwxrwx    1 root root     7 Oct   6 09:26 bin -&gt; usr\/bin\r\ndr-xr-xr-x.   6 root root  3072 Oct   6 09:37 boot\r\ndrwxr-xr-x   19 root root  3140 Oct   6 09:36 dev\r\ndrwxr-xr-x.  82 root root  4096 Oct   6 09:47 etc\r\ndrwxr-xr-x.   3 root root  4096 Nov   5  2016 home\r\nlrwxrwxrwx    1 root root     7 Oct   6 09:26 lib -&gt; usr\/lib\r\nlrwxrwxrwx    1 root root     9 Oct   6 09:26 lib64 -&gt; usr\/lib64\r\ndrwx------.   2 root root 16384 Apr  13  2015 lost+found\r\ndrwxr-xr-x.   3 root root  4096 Nov   5  2016 media\r\ndrwxr-xr-x.   2 root root  4096 Nov   5  2016 mnt\r\ndrwxr-xr-x.   3 root root  4096 Nov   5  2016 opt\r\ndr-xr-xr-x  100 root root     0 Oct   6 09:36 proc\r\ndr-xr-x---.   4 root root  4096 Oct   6 10:18 root\r\ndrwxr-xr-x   27 root root   780 Oct   6 10:18 run\r\nlrwxrwxrwx    1 root root     8 Oct   6 09:26 sbin -&gt; usr\/sbin\r\ndrwxr-xr-x.   2 root root  4096 Nov   5  2016 srv\r\ndr-xr-xr-x   13 root root     0 Oct   6 09:36 sys\r\ndrwxrwxrwt.  12 root root  4096 Oct   6 11:33 tmp\r\ndrwxr-xr-x.  13 root root  4096 Oct   6 09:26 usr\r\ndrwxr-xr-x.  21 root root  4096 Oct   6 09:45 var<\/pre>\n<\/blockquote>\n<p>If you wonder what I used to retrieve the list, simply type &#8220;ls -l \/&#8221;. Now let&#8217;s type a different command, the &#8220;df -h&#8221; command, you should see something similar to the following:<\/p>\n<blockquote>\n<pre>Filesystem               Size Used Avail Use% Mounted on\r\n<strong>\/dev\/mapper\/vg-lv_root   18G  2.5G   14G  15% \/<\/strong>\r\ndevtmpfs                486M     0  486M   0% \/dev\r\ntmpfs                   497M     0  497M   0% \/dev\/shm\r\ntmpfs                   497M  6.8M  490M   2% \/run\r\ntmpfs                   497M     0  497M   0% \/sys\/fs\/cgroup\r\n\/dev\/sda1               477M  136M  313M  31% \/boot\r\ntmpfs                   100M     0  100M   0% \/run\/user\/1000\r\n<strong>\/dev\/mapper\/vg-lv_opt    20G    1G   19G   5% \/opt<\/strong><\/pre>\n<\/blockquote>\n<p>Now, for simplicity, let&#8217;s concentrate on the first line &#8220;\/&#8221; and the last line &#8220;\/opt&#8221;. I have highlighted the 2 lines.<\/p>\n<p>So, this tells us that device &#8220;<strong>\/dev\/mapper\/vg-lv_root<\/strong>&#8221; is mounted on &#8220;\/&#8221; (the root of the filesystem) and that device &#8220;<strong>\/dev\/mapper\/vg-lv_opt<\/strong>&#8221; is mounted on &#8220;\/opt&#8221;, this is a very common setup for a UNIX system.<\/p>\n<p>&#8220;\/&#8221; is 18G and &#8220;\/opt&#8221; is 20G. So, all files residing in &#8220;\/&#8221; and sub-directories with the exception on &#8220;\/opt&#8221; will reside on device\u00a0&#8220;<strong>\/dev\/mapper\/vg-lv_root<\/strong>&#8221; and all the files residing in &#8220;\/opt&#8221; and sub-directories will reside on device &#8220;<strong>\/dev\/mapper\/vg-lv_opt<\/strong>&#8220;.<\/p>\n<p>This system is mainly used to segregate parts of systems so that they can be controlled and not interfere with each other. For example: if \/opt fills up to 100% the system will continue to function because &#8220;\/&#8221; is independent.<\/p>\n<p>I hope this clears up mount-points and what\/how\/why they are used.<\/p>\n<p>Always thanks for reading&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have probably heard the term &#8220;mount-point&#8221; and wondered, or maybe not. You know it&#8217;s there, and files are in it, but you don&#8217;t know what it is? If this is the case then read this article&#8230; I am assuming that you know what a file and\/or a directory is, a directory is also called &hellip; <a href=\"https:\/\/pipeawk.com\/index.php\/2017\/10\/06\/the-unix-mount-point\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The UNIX Mount Point&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-unix"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":8,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/posts\/46\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pipeawk.com\/index.php\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}