{"id":61,"date":"2013-10-09T18:04:05","date_gmt":"2013-10-09T18:04:05","guid":{"rendered":"http:\/\/www.linuxauthority.com\/wordpress\/?p=61"},"modified":"2013-10-09T18:47:41","modified_gmt":"2013-10-09T18:47:41","slug":"quick-and-dirty-autofs-script-share","status":"publish","type":"post","link":"https:\/\/www.linuxauthority.com\/wordpress\/?p=61","title":{"rendered":"Quick and dirty autofs script share"},"content":{"rendered":"\n<!-- ALL ADSENSE ADS DISABLED -->\n<p>I run a large unix and linux server farm on the west coast. In the old days we had problems with scrip versions. The problem was we pushed scripts from a central server and inevitably due to network or space issues the updates did not happen reliably.<\/p>\n<p>In 2012 we opened up our unix management server to NFS. We mounted \/opt\/scripts for scripts access and \/var\/rep to allow central report writing by scripts. Worked well, but some of the servers were in remote locations and stuff hung when network issues arose.<\/p>\n<p>So we wanted to make the system on demand.<\/p>\n<p>So we used autofs.<\/p>\n<p>On the management server:<\/p>\n<p><strong>\/sbin\/service autofs stop<\/strong><\/p>\n<p><strong>\/sbin\/service nfs stop<\/strong><\/p>\n<p><strong>\/sbin\/service nfslock stop<\/strong><\/p>\n<p><strong>cd \/opt<\/strong><\/p>\n<p><strong>mv scripts shared<\/strong><\/p>\n<p><strong>cd \/var<\/strong><\/p>\n<p><strong>mv rep shared<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\/etc\/auto.master configuration (comments snipped)<\/p>\n<p><strong>\/- \/etc\/auto.direct<\/strong><br \/>\n<strong>+auto.master<\/strong><\/p>\n<p>\/etc\/auto.direct configuration (comments snipped)<\/p>\n<p><strong>\/opt\/scripts -ro,soft,intr lxmanag01.mydomain.com:\/opt\/shared<\/strong><br \/>\n<strong>\/var\/rep -rw,soft,intr lxmmang01.mydomain.com:\/var\/shared<\/strong><\/p>\n<p>\/etc\/exports configuration<\/p>\n<p><strong>\/opt\/shared *(ro,sync,no_root_squash)<\/strong><br \/>\n<strong>\/var\/shared *(rw,sync,no_root_squash)<\/strong><\/p>\n<p>Start nfs,nfslock,autofs<\/p>\n<p>Push auto.direct and auto.master to the entire environment and restart autofs.<\/p>\n<p>Next we will see if it works with HP-UX (other website)<\/p>\n<p>Even works on local scripts<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I run a large unix and linux server farm on the west coast. In the old days we had problems with scrip versions. The problem was we pushed scripts from a central server and inevitably due to network or space issues the updates did not happen reliably. In 2012 we opened up our unix management [&hellip;]<\/p>\n<a role=\"link\" class=\"rtp-readmore\" title=\"Read more on Quick and dirty autofs script share\" href=\"https:\/\/www.linuxauthority.com\/wordpress\/?p=61\" rel=\"nofollow\">Read More &rarr;<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,21],"tags":[18,19],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-networking","category-scripting-2","category-systems-administration","tag-autofs","tag-shared-scripts"],"_links":{"self":[{"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61"}],"collection":[{"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxauthority.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}