DistributedNetworks DistributedNetworks

Network File Services  «Prev  Next»
Lesson 7 Displaying currently mounted NFS filesystems
Objective Display currently mounted NFS filesystems.

Displaying currently mounted NFS Filesystems

With your NFS server running, you might occasionally want to know what clients have mounts to your system. Keeping track of this information provides diagnostic, performance, and security data that will help to maintain your NFS server.
The showmount command displays currently mounted NFS filesystems. To show all currently mounted NFS filesystems, use the -a parameter. Optionally, you may specify a hostname as the last parameter.
Each line of showmount's output is a mounted filesystem. The name before the colon (:) is the host that obtained the mount. The name after the colon is the mounted directory.The image below shows the output of showmount -a on a sample system.

Output from the "showmount -a" command.

If you provide NFS services across the Internet, you should routinely check the system log and the list of mounted systems.
The next lesson explains how to use the automounter with NFS.

Mounting NFS File Systems

Use the mount command to mount a shared NFS directory from another machine:
mount shadow.redhatlinux.com:/misc/export /misc/local
Warning: The mount point directory on local machine (/misc/local in the above example) must exist.
In this command,
is the hostname of the NFS file server, /misc/export is the directory that shadowman is exporting, and /misc/local is the location to mount the file system on the local machine.
After the mount command runs (and if the client has proper permissions from the shadow.redhatlinux.com NFS server) the client user can execute the command ls
to display a listing of the files in /misc/export on shadow.redhatlinux.com.