vfstab(4) — FILE FORMATS
NAME
vfstab − table of file system defaults
SYNOPSIS
#include <sys/fstyp.h>
#include <sys/param.h>
#include <sys/vfstab.h>
DESCRIPTION
The file /etc/vfstab describes defaults for each file system.
There are seven whitespace-separated fields in this table. Each field is described below.
The first field contains the block special device for mounting a local file system, a resource description if an RFS resource is to be mounted, or a remote directory (in the form host:directory-name) if an NFS mount is desired.
The second field should contain the character special device corresponding to the block special device in the first field if a local file system mount is specified, or a ’-’ if an RFS or NFS mount is specified.
The third field specifies the absolute path name of the mount directory.
The fourth field specifies the the file system type. For local file systems, this field should contain ’s5’, ’ufs’, or ’bfs’ for fast file system (UFS), system five file system (s5), and boot file system (BFS) mounts respectively. This field should contain the string ’rfs’ or ’nfs’ for RFS and NFS remote mounts respectively.
The fifth field specifies the fsck pass number. This field should contain a ’-’ for RFS and NFS mounts. Local mount requests may be grouped into passes, with all mounts in a given pass being checked by fsck before the next pass is performed. The pass numbers should start with one, and increase by one.
The sixth field specifies whether the mount request should be automatically initiated at boot time. This field should contain the string ’yes’ or ’no’.
The seventh field specifies the mount options appropriate for the type of mount requested. Typically this field contains the string ’rw’, which allows reading and writing of the mount, or ’ro’, which specifies that the mount is read-only. Other values for this field are possible; for more information please refer to the appropriate mount man page listed in the "SEE ALSO" section below.
Empty lines and lines containing a ’#’ in the first column are ignored.
Each field in this file is also associated with a structure, defined in sys/vfstab.h:
struct vfstab {
char ∗vfs_special;
char ∗vfs_fsckdev;
char ∗vfs_mountp;
char ∗vfs_fstype;
char ∗vfs_fsckpass;
char ∗vfs_automnt;
char ∗vfs_mntopts;
};
The getvfsent(3C) family of routines are used to read and write to /etc/vfstab.
SEE ALSO
fsck(1M), mount(1M), setmnt(1M), mountall(1M), mount_ufs(1M), mount_s5(1M), mount_bfs(1M), mount_rfs(1M), mount_nfs(1M), getvfsent(3C).