Skip to content

Instantly share code, notes, and snippets.

@ajdecon
Created January 21, 2012 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajdecon/1654135 to your computer and use it in GitHub Desktop.
Save ajdecon/1654135 to your computer and use it in GitHub Desktop.
nfs head node recipe for blogpost
# Recipe for a cluster head node with an NFS share
# Install NFS packages
package("nfs-common")
package("nfs-kernel-server")
# Make sure the diretory to be exported exists
node.nfs['shared_dirs'].each do |d|
directory d do
mode "0777"
action :create
end
end
# Create the exports file and refresh the NFS exports
template "/etc/exports" do
source "exports.erb"
owner "root"
group "root"
mode "0644"
end
# Start the NFS server
service "nfs-kernel-server" do
action [:enable,:start,:restart]
end
execute "exportfs" do
command "exportfs -a"
action :run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment