Aug 312009

Step 1:

Start nfs, nfslock, portmap services

remote-server# service portmap start
remote-server# service nfs start
remote-server# service nfslock start

Step 2:

On remote server destination edit file /etc/exports

For example we will mounting /var/data/ directory on remote server

/var/data local-ip(rw,sync,no_wdelay,no_subtree_check,all_squash,anonuid=89,anongid=89)

anonuid and anongid

These options explicitly set the uid and gid of the anonymous account. This option is primarily useful for PC/NFS clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe). (quote from man exports) In local server, if we want to mount remote directory /var/data on local directory for example /local/data/ we have to specify it on fstab

remote-ip:/var/data /local/data nfs defaults,soft,retrans=2,timeo=1,rsize=16384,wsize=16384,noauto 0 0

And then, mount it manualy(nextime when we restart our server it’ll be mounted automaticaly)

# mount remote-ip:/var/data /local/data

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>