IT 4100 : File Systems and Storage Technologies

NFS


Remote Filesystems

Up until now, we have focused on local storage systems.

What is a remote filesystem? Benefits? Drawbacks? When would you use one?


What is NFS


Why NFS


Clients


Server

When receiving a MNT request from an NFS client, rpc.mountd checks both the pathname and the sender’s IP address against its export table. If the sender is permitted to access the requested export, rpc.mountd returns an NFS file handle for the export’s root directory to the client. The client can then use the root file handle and NFS LOOKUP requests to navigate the directory structure of the export. -man page - /etc/exports - nfsd


Tidbits


NFS options


Exports options


Export options


Root squashing

nfsd bases its access control to files on the server machine on the uid and gid provided in each NFS RPC request. The normal behavior a user would expect is that she can access her files on the server just as she would on a normal file system. This requires that the same uids and gids are used on the client and the server machine. This is not always true, nor is it always desirable

It may not be desirable that the root user on a client machine is also treated as root when accessing files on the NFS server. To this end, uid 0 is normally mapped to a different id: the so-called anonymous or nobody uid. This mode of operation (called root squashing’) is the default, and can be turned off with no_root_squash.