1) Why we use NFS server?
Ans :- we used NFS (Network File Sharing) server to share a file or a directory over the network but we can share only LINUX to LINUX .
2) On which port linux NFS server work?
Ans :- 2049 for nfs
111 for rpcbind
3) Which package we used to configure NFS server?
Ans : - nfs-utils, nfs-utils-lib
4) What is the main configuration file for NFS server?
Ans : - /etc/exports
5) How to restart the service of NFS server in Linux?
Ans :- service nfs restart (in RHEL-6)
systemctl restart nfs-server.service (in RHEL-7)
6) How to enable the service of ftp server in Linux?
Ans :- Service vsftpd enable (in RHEL-6)
or
/etc/init.d/vsftpd enable (in RHEL-6)
systemctl enable nfs-server.service (in RHEL-7)
7) How to start nfs Server ?
Ans:- service nfs start (in RHEL-6)
systemctl start nfs (in RHEL-7)
8) What are different options used in /etc/exports file ?
Ans:- following options are used in /etc/exports file
ro: this is default option when nothing is specified . NFS clients can read files on the NFS share.
rw: Allows read and write access for the NFS clients.
no_root_squash : if this option is used , then root on the client machine will have the same level of access to the files on the system as root on the server.
sync : Replies to the NFS request only after all data has been written to disk. This is much safer than async, and is the default in all nfs-utils versions after 1.0.0.
async : Replies to requests before the data is written to disk. This improves performance, but results in lost data if the server goes down.
9) How to list available nfs share on local machine & remote machine?
Ans:- ‘showmount -e localhost’ :- Shows the available shares on your local machine ‘showmount -e <Remote-server-ip or hostname>:- Lists the available shares at the remote server.
10) How to check iostat of nfs mount points ?
Ans:- Using command ‘nfsiostat‘ we can list iostat of nfs mount points.
11) How to check nfs server version ?
Ans:- ‘nfsstat -o all’ command shows all information about active versions of NFS.
12) What is portmap?
Ans:- The port-mapper keeps a list of what services are running on what ports. This list is used by a connecting machine to see what ports it wants to talk to access certain services.
13) How to re-export all the directories of ‘/etc/exports’ file ?
Ans:- Using the command “exportfs –r”, we can re-export or refresh entries of “/etc/exports” file without restarting nfs service
14) Can NFS share mounted on Windows XP, Why?
Ans:- No , Window XP operating system doesn’t support nfs protocol.
15) 172.11.1.11:/grras is exported by NFS Server and i want to add this NFS share to client /etc/fstab file. How you will add this entry in /etc/fstab file?
Ans:- # vim /etc/fstab
device mount-point fs-type options dump fsckorder
172.11.1.11:/grras /mnt nfs rw 0 0
16) Explain this entry /thankyou 172.11.1.11/24(sync,rw) in /etc/exports file.
Ans:- allows a system which have 172.11.1.11 IP address and provide read-write access to the /thankyou/ directory
17) Which file would you edit to mount an NFS filesystem at system boot time?
Ans:- /etc/fstab
18) RPC stands for?
Ans:- remote procedure call.
19) How to retrieve a list of clients connected to the NFS server ?
Ans:- To retrieve a list of clients connected to the NFS server, use the showmount command from a shell prompt. To also show the directories the clients are connected to, use the showmount -a command.
20) Which kernel module is used by “rpc.nfsd”?
Ans:- nfsd.o kernel module
21) Name of Configuration file for NFS Server
Ans:- /etc/exports
22) Explain “exportfs” command?
Ans:- The exportfs command is used to maintain the current table of exported file systems for NFS.
23) Explain “Soft Mounting” option at NFS Client?
Ans:- if a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied (for example, the server is down), then it quits. This is called soft mounting.
24) Explain “Hard Mounting” option at NFS Client?
Ans:- If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied, then it will not quit until the request is satisfied. This is called hard mounting.
25) Which NFS versions are available?
Ans:- NFS Version 2 NFS Version 3 NFS Version 4
26) What is different between NFS Version 2 & 3?
Ans:- Version nfs 2 have 8kb transfer rate and Version nfs 3 have 32kb transfer rate.
27) Explain some options with exportfs command?
Ans:- exportfs options,
-a :->exports or unexports all directories.
–r :->re-exports all directories.
–v :->verbose means what’s going on while exporting and unexporting .
–u :->unexports one or more directories .
28) Which SELinux security context is used for NFS share?
Ans:- public_content_t.
Comentarios