Previous Table of Contents Next

Making File Systems Available

When you have created a file system, you need to make it available; you do this by mounting it. A mounted file system is attached to the system directory tree at the specified mount point and becomes available to the system. The root file system is always mounted. Any other file system can be connected or disconnected from the root file system.

You can mount a local file system in these ways:

  By creating an entry in the /etc/vfstab (virtual file system table) file. The /etc/vfstab file contains a list of file systems that are automatically mounted when the system is booted in multiuser state. See the section "The Virtual File System Table (/etc/vfstab)" earlier in this chapter for a description of the /etc/vfstab file.
  From a command line using the mount command.

File systems on disk slices must always be mounted on the server system and shared (exported) before other systems can access them. See "Sharing Files from a Server" later in this chapter for information about sharing file systems. When file systems are shared from a server, a client can mount them as NFS file systems in any of these three ways:

  By adding an entry to the /etc/vfstab file so that the file system is automatically mounted when the system is booted in multiuser state.
  By using the automount program to automatically mount or unmount the file system when a user changes into (mount) or out of (umount) the automounting directory.
  By using the mount command at a command line.

Understanding Mounting and Unmounting

File systems can be attached to the hierarchy of directories available on a system. This process is called mounting. To mount a file system you need:

  To be superuser.
  A mount point on the local system. The mount point is a directory to which the mounted file system is attached.
  The resource name of the file system to be mounted (for example, /usr).

As a general rule, local disk slices should always be included in the /etc/vfstab file. Any software from servers, such as CDE, OpenWindows, or manual pages, and home directories from a server can either be included in the /etc/vfstab file or be automounted, depending on the policy at your site.

When you mount a file system, any files or directories that might be present in the mount point directory are unavailable as long as the file system is mounted. These files are not permanently affected by the mounting process and become available again when the file system is unmounted. However, mount directories usually are empty because you usually do not want to obscure existing files.

The system tracks the mounted file systems in the /etc/mnttab (mount table) file. Whenever you mount or unmount a file system, the /etc/mnttab file is modified to show the list of currently mounted file systems. You can display the contents of the mount table using the cat or more command but you cannot edit the mount table as you would the /etc/vfstab file. Here is an example of a mount table file:

drusilla% more /etc/mnttab
/dev/dsk/cØt3dØsØ         /       ufs     rw,suid 693186371
/dev/dsk/cØt1dØs6         /usr    ufs     rw,suid 693186371
/proc   /proc   proc      rw,suid 693186371
swap    /tmp    tmpfs     ,dev=Ø 693186373
swsvr4-5Ø:/export/svr4/openwinV3 /usr/openwin    nfs     rw,dev=21cØØØØ
swsvr4-5Ø:/export/svr4/man      /usr/man        nfs    rw,dev=21cØØØ1
drusilla:(pid127)    /nse  nfs
ro,ignore,map=/etc/auto.nse,indirect,dev=21cØØØ2 693186449
drusilla:(pid127)    /net    nfs
drusilla:(pid127)       /home   nfs
ro,ignore,map=/etc/auto_home,indirect, dev=21cØØØ4
bigriver:/export/home/bigriver  /tmp_mnt/home/bigriver  nfs

Previous Table of Contents Next