nfs on enterprice linux - to be continued

This is just a resume from the things I read in some articles and things I experience while applying them.

0. Point Zero
Some considerations are in place.
NFS stands for Network File System, or ... you need a network and you need a filesystem to be shared. This latter is in a certain way a big limitation of the possibilities of NFS. it is not possible to share a subdirectory of a filesystem.

a. Use an nfs share

a.1. verify the portmapper is running
To do this run
rpcinfo -p
The portmapper should be in the list that is returned.

a.2. Mount the share
Just use the mount command telling the type of drive is nfs and the location where to find the share and how the share is called.
$> mount -t nfs :
example:
mount -t nfs mynfsserver:software /remoteshares/software
The location must exist upfront.

To unmount
$> umount

b. Create an nfs share

b.1. define the shares that may be exported
The shares are defined in the /etc/exports file.
Look to this location for information on the possible options.
A very simple example of the file
/Software *.hellings.be(ro)
/Share *.hellings.be(rw,all_squash,anonuid=100,anongid=100)

use exportfs to update the mountd tables.
$> exportfs -rav

b.2. (re)start the nfs server
This depends on how nfs has been installed.
If installed as a service use
service nfs restart

c. Mounting nfs shares at boot time

A line should be added to the fstab file in /etc.
Look in the referenced articles for further details.
It should look something like
: nfs rw 0 0
nfs is the type of filesystem
rw can be elaborated with a lot of other options
0 (this is the number zero) is the dump indicator
0 (again ... zero) is the fsckorder flag.

d. What about permissions on nfs share drives?

Not investigated yet .... sorry ...
The only thing is that you can set a 'replacement' user and group on the level of the nfs-share definition in the /etc/exports file, using the anonuid and anongid options. this in combination with all_in_squash option.

e. References
This is the original article

NFS reference pages
...

No comments: