Visit our main website ›
Page Title
Body If you have multiple servers, you may want to set up NFS to share files between them or to cross backup. On each of the clients, you'll want to use autofs to automount the shared directories after a reboot. h2. On the server (the one sharing directories) <pre><code>yum install nfs-utils portmap autofs</code></pre> Edit /etc/exports and permit sharing. Use the private address of the client, which you can check with <code>ifconfig eth1</code>. Add one line like this for each client. <pre><code>/path/to/share 10.0.x.x(rw,async,all_squash,anonuid=596,anongid=596)</code></pre> Then start the services <pre><code>chkconfig portmap on chkconfig nfslock on chkconfig nfs on service portmap start service nfslock start service nfs start</code></pre> h2. On each client We're going to mount the shared directory at /backup/assets <pre><code>yum install nfs-utils portmap autofs chkconfig autofs on chkconfig portmap on chkconfig nfslock on service portmap start service nfslock start mkdir -p /backup/assets #Put this in /etc/auto.master: /backup /etc/auto.backup --timeout=60 #Put this in /etc/auto.backup (using the server's private address): assets -rw,soft,intr,rsize=8192,wsize=8192 10.0.x.x:/path/to/share service autofs start cd /backup/assets </code></pre> h2. User Submitted Notes I used the id of one of my regular users (the deploy user -- user id 500, found in /etc/passwd) to enable the ability to create and write to files in the share: <pre><code> /path/to/share 10.0.x.x(rw,async,all_squash,anonuid=500,anongid=500) </code></pre>
Make page private