65.List and explain all NFS server commands.
Ans.
1. exportfs:
a) The exportfs command enables user to manipulate the list of current exports without editing /etc/exports.
b) It also maintains the list of currently exported file system in /var/lib/nfs/etab.
Example:
The exportfs –a command initializes /var/lib/nfs/etab, synchronizes it with the contents of /etc/exports.
c) To add a new export to etab and also /etc/exports the syntax is :
#exportfs –o opts hostdir
d) Example:
#exportfs –o sync,rw 192.168.166.7:/demo
The above command exports the directory /demo to client 192.168.166.7 with export option rw and sync.
e) –v option of this command, lists currently exported filesystem.
Example:
#exportfs –v
f) –u options unexports the filesystem as follow:
Example:
#exportfs –u 192.168.166.7:/demo
2. showmount:
a) The showmount command provides information about clients and the file systems they have mounted.
b) Syntax is : #showmount [-advhe] [host]
c) Options are as follows:
-d: list only directories
-a: list all the information
-e: lists exported file system
-v: shows showmount’s version number
-h: shows short summary
d) When used with IP address, it lists all the IPs that specific client has mounted.
Example:
#showmount 192.168.166.7
e) #showmount –a
It will show all mount points
f) #showmount –d
It will show only mounted directories
g) #showmount –e
It will show server’s export list.
3. rpcinfo:
a) It is general purpose program to display information about programs that uses RPC protocol.
b) When rpcinfo command is used with –p option it make sure that required daemons are running.
c) Example:
#rpcinfo –p
4. nfsstat:
a) provides status information of nfs
b) Example:
#nfsstat
Ans.
1. exportfs:
a) The exportfs command enables user to manipulate the list of current exports without editing /etc/exports.
b) It also maintains the list of currently exported file system in /var/lib/nfs/etab.
Example:
The exportfs –a command initializes /var/lib/nfs/etab, synchronizes it with the contents of /etc/exports.
c) To add a new export to etab and also /etc/exports the syntax is :
#exportfs –o opts hostdir
d) Example:
#exportfs –o sync,rw 192.168.166.7:/demo
The above command exports the directory /demo to client 192.168.166.7 with export option rw and sync.
e) –v option of this command, lists currently exported filesystem.
Example:
#exportfs –v
f) –u options unexports the filesystem as follow:
Example:
#exportfs –u 192.168.166.7:/demo
2. showmount:
a) The showmount command provides information about clients and the file systems they have mounted.
b) Syntax is : #showmount [-advhe] [host]
c) Options are as follows:
-d: list only directories
-a: list all the information
-e: lists exported file system
-v: shows showmount’s version number
-h: shows short summary
d) When used with IP address, it lists all the IPs that specific client has mounted.
Example:
#showmount 192.168.166.7
e) #showmount –a
It will show all mount points
f) #showmount –d
It will show only mounted directories
g) #showmount –e
It will show server’s export list.
3. rpcinfo:
a) It is general purpose program to display information about programs that uses RPC protocol.
b) When rpcinfo command is used with –p option it make sure that required daemons are running.
c) Example:
#rpcinfo –p
4. nfsstat:
a) provides status information of nfs
b) Example:
#nfsstat
Comments
Post a Comment