Search This Blog

Wednesday, June 30, 2010

All About NFS

1)Definition
2)Why to use
3)External source for reading.
4)Syntax
5)Example

1)The Network File System (NFS) is an industry standard.

2)NFS allows entire file systems to be shared among other machines in a network.

3)A very good article about NFS can be found at following location.
http://www.linux-tutorial.info/modules.php?name=MContent&pageid=150

4)
Before we talk about the syntax lets make some things clear about nfs.

In NFS architecture there is a Server and client(s).
Server is the one who is having a disk space to share.
Client is the one who want to use space on remote machine.

The syntax for using the mount command to mount remote file system is basically the same as for local file systems.
The difference being that you specify the remote host along with the exported path. For example, if I want to mount the man-pages from 10.180.18.222, I could do it like this:
First make following path exists in client .
/usr/man
if it doesn't exists then create it.

run following command at client command prompt.
#mount -t nfs [-o options] 10.180.18.222:/usr/man /usr/man

5)

In following example i m sharing a folder using NFS.

NFS Server:
Make sure nfs service is running.
# service nfs status
rpc.mountd (pid 10428) is running...
nfsd (pid 10425 10424 10423 10422 10421 10420 10419 10418) is running...

I m sharing below folder.

# ls -ltrd /shareddocument/
drwxr-xr-x 2 root root 4096 Jan 25 17:16 /shareddocument/

Command to share the folder to client.

# exportfs client_ip_address:/shareddocument

type exportfs to list shared folders and clients who can share them.

# exportfs
/shareddocument client_ip_address


NFS Client:

Make sure nfs service is running.

Mount the folder

# mount server_ip_address:/shareddocument /shareddocumentonserver

NFS mount using exportfs is well documented in below link.

http://www.thegeekstuff.com/2010/10/nfs-mount-guide/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeekStuff+%28The+Geek+Stuff%29

More on this coming soon.

2 comments:

  1. hey just came across the link to this blog from a signature at TE... great initiative man... it really helps guys like me who are just starting out..
    thanks a ton

    ReplyDelete
  2. nice to hear.I will keep on posting my exp with Linux :).

    ReplyDelete