Search Engine

Loading

Sallar

Sallar
RedhatEnterpriseLinux Blog

Installing and configring nfs-server step by step part 2


Now export the file to network
If you already started the services before creating an /etc/exports file, you can also use the exportfs command to manually export any new resources added to the /etc/exports file.
Syntax: exportfs [options]
Options:


-a        Exports or unexports all directories
-r         Reexports all directories
-u        Unexports one or more directories
-v        Provides verbose output

Step 1: Here is what a manual export of resources would look like:
# exportfs -avr
exporting *:/opt/company_data
exporting *:/home

Step 2. Alternatively, you can also get the same effect by restarting only the NFS service, which in turn restarts all daemons:

# service nfs restart
Shutting down NFS mountd:                  [ OK ]
Shutting down NFS daemon:                  [ OK ]
Shutting down NFS quotas:                    [ OK ]
Shutting down NFS services:                  [ OK ]
Starting NFS services:                               [ OK ]
Starting NFS quotas:                                 [ OK ]
Starting NFS daemon:                               [ OK ]
Starting NFS mountd:                               [ OK ]


Now that all the resources have been exported properly and the NFS service has been started, you can use the rpcinfo command to verify that all the parts of the NFS service are running properly.
Syntax: rpcinfo -p [host]
You can view both local and remote connection information with the rpcinfo command. Because you are looking for information about the local server, you don’t have to specify a host when calling the command. View the current running nfs daemons:
# rpcinfo -p
program vers proto port service
100000         4         tcp     111    portmapper
100000         3         tcp     111    portmapper
100000         2         tcp     111    portmapper
100000         4         udp    111    portmapper
100000         3         udp    111    portmapper
100000         2         udp    111    portmapper
100024         1         udp    41853 status
100024         1         tcp     40535 status
100011         1         udp    875    rquotad
100011         2         udp    875    rquotad
100011         1         tcp     875    rquotad
100011         2         tcp     875    rquotad
100003         4         tcp     2049 nfs
100003         4         udp    2049 nfs
100021         1         udp    32769 nlockmgr
100021         3         udp    32769 nlockmgr
100021         4         udp    32769 nlockmgr
100021         1         tcp     32803 nlockmgr
100021         3         tcp     32803 nlockmgr
100021         4         tcp     32803 nlockmgr

Where you see the nfs daemon running, notice that only version 4 is listed. The reason is that you disabled all other versions in the config file. Although some of the other daemons listed use other versions as well, you should verify that at least the nfs daemon shows version 4.
 Installing and configring nfs-server step by step part 3

0 comments:

Post a Comment

Powered by Blogger.

Ads

 
Copyright © Redhat Enterprise linux. Original Concept and Design by My Blogger Themes
My name is Abdul Razaq but people call me Raziq. Here is my home page: www.redhatenterpriselinux.blogspot.com I live in Quetta, Pakistan and work as an IT-Engineer.