Linux Network File System (NFS)

 Home  

About Me

About My Home Town

MicroSoft World

For Engg. Student

Internet Protocols

Linux World

Favorite Sites

Fun Time

Contect Me

 

Linux Server Setup

NFS requires RPC to operate. The following daemons are run when the linuxconf nfs service is started:

  1. rpc.rquotad - Enforces the set quotas for remote mounted NFS systems.
  2. rpc.mountd - Performs the requested mounts.
  3. rpc.nfsd - Handles the user interface to the kernel module that performs NFS.

Server Configuration
To set up the server side:

  1. Edit the file "/etc/exports" as in one of the examples below.
  2. Then type "exportfs -a".
  3. Activate NFS services using linuxconf.
  4. After making any changes, restart the nfs daemon either by using "linuxconf" or typing "/etc/rc.d/init.d/nfs restart". Also if you want changes to the /etc/exports file to take place immediately, install them with the "exportfs -r" command. Doing this, you will not need to restart nfs for changes to be in effect.

This is an example of an exports file for general use:

/data/installs		jimslinux(rw,no_root_squash)
/data/docs		*.mycompany.com(ro,root_squash)
/data			markslinux(rw,no_root_squash) tomscomputer(ro)
/tftpboot		linux3(ro,no_root_squash)
/data			tedslinux(ro,no_root_squash)
 

The third line allows markslinux to have full access even at the root level to all files in /data, but tomscomputer has read only access, at the world (other) level.

This is an example of an exports file set up for diskless computers with remote booting:
 

/tftpboot/lts/ltsroot	10.1.0.101/255.255.0.0(ro,no_root_squash)
/tftpboot/lts/ltsroot	10.1.200.1/255.255.0.0(ro,no_root_squash)
/tftpboot/lts/ltsroot	10.1.200.2/255.255.0.0(ro,no_root_squash)
/tftpboot/lts/linux3	10.1.200.2/255/255.0.0(rw,no_root_squash)

The format of the file is:

	directoryname      hostname(options)

The hostname can be the IP address followed by the netmask as shown above.

Options include:

There are many more options documented in the exports(5) man page.

Performing the mount from the client

To do the mount on the remote machine:

  1. On the remote boot machine, "linux3", after making a /tmp/mnt directory on the remote machine "linux3", type "mount -n 10.1.0.100:/tftpboot/lts/linux3 /tmp/mnt -t nfs".
  2. The -n is only needed if the /etc directory on the remote boot machine is read only.
  3. The 10.1.0.100 address is the address of the NFS server machine with the filesystem being mounted.

Client Setup
To set up the client side on a fully functional Linux machine type "mount -o rsize=1024,wsize=1024 mymachine:/data /mnt/mymachine/data

 

 

 

 

|About Linux || Linux Command || User Creation Command || file Permission || File System || Ttips and Tricks ||

|| Lan Setup || NFS Server || DNS Server|| Samba Server || TelNet || FTP Server

 

 

 

 

 

Copyright © 2000 - 2005 sourabhvikas. All rights reserved Worldwide.
Any duplication, reproduction, or distribution of this material is strictly prohibited.
To access reprinting rights, please contact
Vikas and Sourabh.

Feedback || Disclaimer || Privacy Policy