{"id":2884,"date":"2021-07-19T22:26:29","date_gmt":"2021-07-19T15:26:29","guid":{"rendered":"http:\/\/rachmadona.net\/?p=2884"},"modified":"2021-07-19T22:26:29","modified_gmt":"2021-07-19T15:26:29","slug":"auto-mount-nfs-using-autofs","status":"publish","type":"post","link":"https:\/\/rachmadona.net\/?p=2884","title":{"rendered":"Auto-mount NFS using autofs"},"content":{"rendered":"\n<p>If you are working with shared storage technology. Perhaps this feature also will be useful which allow you to map NFS into your either workstation\/server.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>NFS Server<\/strong> [Use below command to make your own NFS server]<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># rpm -qa | grep nfs-utils\n# yum install nfs-utils rpcbind<\/pre>\n\n\n\n<p>Enable permanent start at boot:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#  systemctl enable nfs-server\n#  systemctl enable rpcbind\n#  systemctl enable nfs-lock\n#  systemctl enable nfs-idmap<\/pre>\n\n\n\n<p>Start NFS service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#  systemctl start rpcbind\n#  systemctl start nfs-server\n#  systemctl start nfs-lock\n#  systemctl start nfs-idmap\n\n<\/pre>\n\n\n\n<p>Check service status<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># systemctl status nfs<\/pre>\n\n\n\n<p>Allowing the Firewall<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># firewall-cmd --add-service=nfs --zone=internal --permanent\n# firewall-cmd --add-service=mountd --zone=internal --permanent\n# firewall-cmd --add-service=rpc-bind --zone=internal --permanent<\/pre>\n\n\n\n<p>Create a shared directory<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># mkdir \/share\n# vi \/etc\/exports\n\/share *(rw)\n# exportfs -r<\/pre>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">Auto-mount NFS client<\/span><\/strong><\/p>\n\n\n\n<p>Nowadays, in order to auto-mount NFS\/shared directory you can just simply follow below command. An example shared folder located in 192.168.201.5:\/share<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2020\/09\/image-3.png\" alt=\"\" class=\"wp-image-2885\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are working with shared storage technology. Perhaps this feature also will be useful which allow you to map NFS into your either workstation\/server. NFS Server [Use below command to make your own NFS server] # rpm -qa | grep nfs-utils # yum install nfs-utils rpcbind Enable permanent start at boot: # systemctl enable&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,13],"tags":[71,74,289,290,291],"class_list":["post-2884","post","type-post","status-publish","format-standard","hentry","category-linux","category-operating-system","tag-auto-mount","tag-automunt","tag-nfs","tag-nfs-client","tag-nfs-server"],"_links":{"self":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2884"}],"version-history":[{"count":0,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2884\/revisions"}],"wp:attachment":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}