9. NFS interview question and answers

Q.What are the main diff between NFS and Samba Servers?
NFS- NFS uses its own protocol
(usually just called "NFS") which is not commonly available
for PCs (NFS clients do exist for operating systems other
than UNIX/Linux)
SMB- SMB protocol which is considered
"standard" for PCs (Windows and OS/2 both have built in
support for it, a free client is also available for DOS, I'm
not sure about MacOS)
NFS- SMB does not (directly) support UNIX style file permissionsSMB- NFS of course supports all
standard UNIX file informationNFS- Samba's SMB protocol allows the server machine to handle
authentication, so it can decide what files the client has
access to based on the particular machine and user
connecting.SMB- NFS by default trusts all client machines
completely (it's really not intended to share files to
unsecured workstations) and lets the client machines handle
authentication all on their own (once an NFS server has been
told to accept connections from a client machine the client
does not require any further server-side authentication, and
can do anything it wants with the filesystem NFS gives it
access to).
Q: - How to retrieve a list of clients connected to the NFS server ?
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.
Q: - Name of Configuration file for NFS Server ?
/etc/exports
Q: - Which NFS versions are available ?
NFS Version 2
NFS Version 3
NFS Version 4
Q: - What is different between NFS Version 2 & 3 ?
nfs 2 default 8kb transfer rate,it did not check the authentication at the time connection.client wants to access unauthorized file it shows error messages like "write error","read error" nfs 3 32kb transfer rate. It check at the time connection- ACL Support
Q: - Can we grant access by Username and password for nfs share?No, access is granted only for IP address.
Q: - What is the role of "all_squash" option?
Treat all client users as anonymous users. Map all user and group IDs to the anonymous user and group ID.
Q: - What is the role of "root_squash" option?
All requests from the user root are translated or mapped as if they came from the user anonymous (default).
Q: - Explain option "all_squash"?
The UID and GID of exported files are mapped to the user anonymous. It is good for public directories.
Q: - Explain "exportfs" command?
The exportfs command is used to maintain the current table of exported file systems for NFS.
Q: - Explain command "/usr/sbin/exportfs -f"?
It will flush everything out of the kernels export table. Any clients that are active will get new entries added by mountd when they make their next request.
Q: - Which option is used with exportfs command to display the current export list, also displays the list of export options?
exportfs -v
Q: - Which option is used with exportfs command to re-export all directories?
exportfs -r
Q: - How you will export directory (/data) to host 192.168.1.51, allowing asynchronous writes without adding the entry in /etc/exports file?
 # exportfs -o async 192.168.1.51:/data
Q: - Is rpc.mountd daemon supports TCP_WRAPPERS?
Yes, The rpc.mountd daemon is protected by the tcp_wrappers. You have to give the clients access to rpc.mountd if they should be allowed to use NFS Server.
Q: - Explain "nfsstat" command?
The nfsstat command displays the statistics about NFS client and NFS server activity.
Q: - What do you understand by "nfsstat -o all -234" command?
It will Show all information about all versions of NFS.
Q: - What do you understand by "nfsstat --nfs --server -3" command?
It will show statistics for NFS version 3 server.
Q: - Can NFS share mounted on Window XP and Justify your answer?
No, Window XP operating system doesn’t support nfs protocol.
Q: - Explain "Soft Mounting" option at NFS Client?
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.
Q: - Explain "Hard Mounting" option at NFS Client?
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.
Q: - What is "portmap"?
The portmapper 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.
Q: - How you will check "portmap" service is running or not?
rpcinfo -p
Q: - I am unable to mount a NFS share. How will you trace out the reason?
Firstly, check that you have permissions to mount nfs share or not. Check /etc/exports file.
Secondly you can get RPC error: Program Not Registered (or another "RPC" error)
For this check your NFS server and portmap service running or not by "rpcinfo -p"
Q: - Can I modify export permissions without needing to remount clients in order to have them take effect?
Yes. The safest thing to do is edit /etc/exports and run "exportfs -r".


_____________________________________________________________________________________________
Click Back..                                Click Home..

https://docs.google.com/forms/d/1iNRZlJJO6rBFizzPcFmyOTEtfkdjhdVRmpM74IbiT3o/viewform