1 VFSTAB(4)                        File Formats                        VFSTAB(4)
   2 
   3 
   4 
   5 NAME
   6        vfstab - table of file system defaults
   7 
   8 DESCRIPTION
   9        The file /etc/vfstab describes defaults for each file system. The
  10        information is stored in a table with the following column headings:
  11 
  12          device       device       mount      FS      fsck    mount      mount
  13          to mount     to fsck      point      type    pass    at boot    options
  14 
  15 
  16 
  17 
  18        The fields in the table are space-separated and show the resource name
  19        (device to mount), the raw device to fsck (device to fsck), the default
  20        mount directory (mount point), the name of the file system type (FS
  21        type), the number used by fsck to decide whether to check the file
  22        system automatically (fsck pass), whether the file system should be
  23        mounted automatically by mountall (mount at boot), and the file system
  24        mount options (mount options). (See respective mount file system man
  25        page below in SEE ALSO for mount options.) A '-' is used to indicate no
  26        entry in a field. This may be used when a field does not apply to the
  27        resource being mounted.
  28 
  29 
  30        The getvfsent(3C) family of routines is used to read and write to
  31        /etc/vfstab.
  32 
  33 
  34        /etc/vfstab can be used to specify swap areas. An entry so specified,
  35        (which can be a file or a device), will automatically be added as a
  36        swap area by the /sbin/swapadd script when the system boots. To specify
  37        a swap area, the device-to-mount field contains the name of the swap file
  38        or device, the FS-type is "swap", mount-at-boot is "no" and all other
  39        fields have no entry.
  40 
  41 EXAMPLES
  42        The following are vfstab entries for various file system types
  43        supported in the Solaris operating environment.
  44 
  45        Example 1 NFS and UFS Mounts
  46 
  47 
  48        The following entry invokes NFS to automatically mount the directory
  49        /usr/local of the server example1 on the client's /usr/local directory
  50        with read-only permission:
  51 
  52 
  53          example1:/usr/local - /usr/local nfs - yes ro
  54 
  55 
  56 
  57 
  58        The following example assumes a small departmental mail setup, in which
  59        clients mount /var/mail from a server mailsvr. The following entry
  60        would be listed in each client's vfstab:
  61 
  62 
  63          mailsvr:/var/mail - /var/mail nfs - yes intr,bg
  64 
  65 
  66 
  67 
  68        The following is an example for a UFS file system in which logging is
  69        enabled:
  70 
  71 
  72          /dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging
  73 
  74 
  75 
  76 
  77        See mount_nfs(1M) for a description of NFS mount options and
  78        mount_ufs(1M) for a description of UFS options.
  79 
  80 
  81        Example 2 pcfs Mounts
  82 
  83 
  84        The following example mounts a pcfs file system on a fixed hard disk on
  85        an x86 machine:
  86 
  87 
  88          /dev/dsk/c1t2d0p0:c - /win98 pcfs - yes -
  89 
  90 
  91 
  92 
  93        The example below mounts a Jaz drive on a SPARC machine. Normally, the
  94        volume management software handles mounting of removable media,
  95        obviating a vfstab entry. Specifying a device that supports removable
  96        media in vfstab  with set the mount-at-boot field to no (as shown below)
  97        disables the  automatic handling of that device. Such an entry presumes
  98        you are not running volume management software.
  99 
 100 
 101          /dev/dsk/c1t2d0s2:c - /jaz pcfs - no -
 102 
 103 
 104 
 105 
 106        For removable media on a SPARC machine, the convention for the slice
 107        portion of the disk identifier is to specify s2, which stands for the
 108        entire medium.
 109 
 110 
 111 
 112        For pcfs file systems on x86 machines, note that the disk identifier
 113        uses a p (p0) and a logical drive (c, in the /win98 example above) for
 114        a pcfs logical drive. See mount_pcfs(1M) for syntax for pcfs logical
 115        drives and for pcfs-specific mount options.
 116 
 117 
 118        Example 3 Loopback File System Mount
 119 
 120 
 121        The following is an example of mounting a loopback (lofs) file system:
 122 
 123 
 124          /export/test - /opt/test lofs - yes -
 125 
 126 
 127 
 128 
 129        See lofs(7FS) for an overview of the loopback file system.
 130 
 131 
 132 SEE ALSO
 133        fsck(1M), mount(1M), mount_hsfs(1M), mount_nfs(1M), mount_tmpfs(1M),
 134        mount_ufs(1M), swap(1M), getvfsent(3C)
 135 
 136 
 137        System Administration Guide: Basic Administration
 138 
 139 
 140 
 141                                September 8, 2015                     VFSTAB(4)