{"id":234,"date":"2015-07-06T11:12:34","date_gmt":"2015-07-06T11:12:34","guid":{"rendered":"http:\/\/www.howtolearnlinux.com\/?p=234"},"modified":"2024-06-19T05:04:55","modified_gmt":"2024-06-19T05:04:55","slug":"nfs-network-file-system","status":"publish","type":"post","link":"http:\/\/shijuvarghese.com\/?p=234","title":{"rendered":"NFS : Network File System"},"content":{"rendered":"<p>A network file system is a computer file system that supports sharing of files, printers, etc over a computer network.<\/p>\n<p>Package : nfs-utils.rpm<\/p>\n<p>Configuration file : \/etc\/exports<\/p>\n<p>Daemon : nfs<\/p>\n<p>Procedure to share a folder via NFS. Here we are going to share \/abc<\/p>\n<p>mkdir \/abc<br \/>\ntouch \/abc\/file_1<br \/>\necho &#8220;\/abc &nbsp; &nbsp; &nbsp; &nbsp; *(ro)&#8221; &gt;&gt; \/etc\/exports<br \/>\nservice nfs restart<\/p>\n<p>Procedure to mount the &#8216;\/abc&#8217; folder from &#8216;genuinewebhosting.net&#8217; to a local folder &#8216;\/mnt\/temp&#8217;<br \/>\nClinet_host ] # mount genuinewebhosting.net:\/abc \/mnt\/temp<\/p>\n<p>If the above mount has to be permanent, we need to add the following entry in \/etc\/fstab in the client host.<br \/>\ngenuinewebhosting.net:\/abc \/mnt\/temp nfs defaults 0 0<\/p>\n<p>client _host ] # mount -a : This command reads the fstab and mounts points not already mounted.<\/p>\n<p>client _host ] # showmount -e genuinewebhosting.net<br \/>\n: This command lists all folders shared by genuinewebhosting.net<br \/>\nAutoFS<\/p>\n<p>Autofs controls the operation of the automount daemons, which automatically mount file systems when you access it, and un-mount them after when not used for a small period of time.<\/p>\n<p>Procedure to share a folder \/abc from genuinewebhosting.net using autofs<\/p>\n<p>mkdir \/new<br \/>\necho &#8220;\/new \/etc\/auto.misc&#8221; &gt;&gt; \/etc\/auto.master<br \/>\necho &#8220;xyz -fstype=nfs 10.146.179.113:\/abc&#8221; &gt;&gt; \/etc\/ auto.misc<br \/>\nservice autofs restart<br \/>\nls -l \/new\/xyz<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>A network file system is a computer file system that supports sharing of files, printers, etc over a computer network. Package : nfs-utils.rpm Configuration file <a class=\"mh-excerpt-more\" href=\"http:\/\/shijuvarghese.com\/?p=234\" title=\"NFS : Network File System\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":265,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-234","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-nfs"],"_links":{"self":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=234"}],"version-history":[{"count":3,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":1424,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/234\/revisions\/1424"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/media\/265"}],"wp:attachment":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}