1vfstab(4)                        File Formats                        vfstab(4)
2
3
4

NAME

6       vfstab - table of file system defaults
7

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 sys‐
22       tem 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
38       file or device, the FS-type is "swap", mount-at-boot is  "no"  and  all
39       other fields have no entry.
40

EXAMPLES

42       The  following  are  vfstab  entries for various file system types sup‐
43       ported 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, obviat‐
95       ing  a  vfstab entry. Specifying a device that supports removable media
96       in vfstab  with set the mount-at-boot field to no (as shown below) dis‐
97       ables  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 CacheFS Mount
119
120
121       Below is an example for a CacheFS file system. Because of the length of
122       this entry and the fact that vfstab entries cannot be  continued  to  a
123       second line, the vfstab fields are presented here in a vertical format.
124       In re-creating such an entry in your own vfstab, you would enter values
125       as you would for any vfstab entry, on a single line.
126
127
128         device to mount:  svr1:/export/abc
129         device to fsck:  /usr/abc
130         mount point:  /opt/cache
131         FS type:  cachefs
132         fsck pass:  7
133         mount at boot:  yes
134         mount options:
135         local-access,bg,nosuid,demandconst,backfstype=nfs,cachedir=/opt/cache
136
137
138
139
140       See mount_cachefs(1M) for CacheFS-specific mount options.
141
142
143       Example 4 Loopback File System Mount
144
145
146       The following is an example of mounting a loopback (lofs) file system:
147
148
149         /export/test - /opt/test lofs - yes -
150
151
152
153
154       See lofs(7FS) for an overview of the loopback file system.
155
156

SEE ALSO

158       fsck(1M),  mount(1M), mount_cachefs(1M), mount_hsfs(1M), mount_nfs(1M),
159       mount_tmpfs(1M), mount_ufs(1M), swap(1M), getvfsent(3C)
160
161
162       System Administration Guide: Basic Administration
163
164
165
166SunOS 5.11                        2 Mar 2007                         vfstab(4)
Impressum