unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



fstab(4)							     fstab(4)



NAME

  fstab	- Static information about mounted file	systems

SYNOPSIS

  /etc/fstab

DESCRIPTION

  The /etc/fstab file contains descriptive information about the known file
  systems and the disk partitions used.	 In Tru64 UNIX Version 5.0, the
  descriptive information for partitions used in swapping and dumping moved
  to the   /etc/sysconfigtab  file.  The /etc/fstab file is read by various
  programs.  When you install the operating system, the	local file systems
  are included in the /etc/fstab file.	Each file system is described on a
  separate line; fields	on each	line are separated by tabs or spaces.  When
  you boot the system, only the	file systems specified in the /etc/fstab file
  are mounted.

  The following	is an example of an /etc/fstab file:

       /dev/disk/dsk2a	     /	     ufs rw 1 1
       /dev/disk/dsk0g	     /usr    ufs rw 1 2
       /dev/disk/dsk2g	     /var    ufs rw 1 2
       /dev/disk/dsk3c	     /usr/users	ufs rw 1 2
       /usr/share/man@rabbit  /usr/share/man  nfs ro,bg	0 0
       usr_dmn#user1   /usr/user1  advfs rw,userquota,groupquota 0 2

  The order of the lines in the	/etc/fstab file	is important because the
  fsck,	mount, and umount commands read	the file sequentially from top to
  bottom.

  The syntax of	a line in the /etc/fstab file is as follows.  Note that	lines
  beginning with a hash	(#) sign are ignored.  Blank lines are also ignored.

  file_spec    mnt_point    fs_type  mnt_options  backup  fsck

  The first field, (file_spec),	describes the block special device, the
  remote file system directory,	or the AdvFS fileset to	be mounted.  For UFS
  file systems,	the special file name is the block special file	name, and not
  the character	special	file name.  If a program needs the character special
  file name, the program must create it	by inserting the letter	r in the
  appropriate place in the device special file name.  For example,
  /dev/rdisk/dsk0g.  For mfs file systems, file_spec can also specify
  switches to the mfs command, separated by commas.  For example, you can
  specify a size of 1024 sectors and the number	of bytes per inode as 1024 by
  passing the following	arguments:

       -s1024,-i2048	       /mfsdir mfs rw

  See mfs(8) for more information.

  The second field, (mnt_point), specifies the mount point for the file	sys-
  tem or remote	directory.

  The third field, (fs_type), specifies	the type of file system.  The system
  currently supports the following file	systems:

  cdfs	    Specifies an ISO 9660 or High Sierra Formatted (CD-ROM) file sys-
	    tem.

  dvdfs	    Specifies a	Universal Disk Format (UDF) formatted file system.

  nfs	    Specifies a	Network	File System (NFS) protocol. The	mount command
	    tries a Version 3 mount first. If does not get a response, it
	    then tries a Version 2 mount.  See mount(8)	for more information
	    on NFS mount options.

  procfs    Specifies a	/proc file system, which allows	you to access and
	    manipulate running processes as if they were files.	 The /proc
	    file system	is used	for debugging purposes.	 You must specify 0
	    (zero) in the freq and order fields	because	the /proc file system
	    should not be backed up or checked.

  ufs	    Specifies a	local UNIX file	system (Berkeley fast file system).

  mfs	    Specifies the memory file system (RAM Disk). (See mfs(8).)

  advfs	    Specifies a	local Advanced File System (AdvFS).

  pcfs	    Specifies the PC File System.

  dfs	    Specifies the DCE Distributed File System.

  efs	    Specifies the DCE Episode File System.

  ffm	    Specifies the File on File Mounting	system (used by	streams).

  fdfs	    Specifies the File Descriptor File System (used by streams).

  nfsv3	    Specifies the Network File System (NFS) Version 3 protocol.

  The fourth field, (mnt_options), describes the mount options associated
  with the file	system or partition.  It is formatted as a comma separated
  list of options and must contain, at a minimum, one of the mount options
  ro, rq, or rw.  You cannot use the options dirty, userquota, or groupquota
  unless you also specify one of the minimum options.

  ro	    Specifies that the file system is mounted with read-only access.

  rq	    Specifies that the file system is mounted with read-write access.

  rw	    Specifies that the file system is mounted with read-write access.

  dirty	    Specifies that the file system can be mounted even if it was not
	    cleanly unmounted.	This is	only for UFS.

  userquota [=filename]	and groupquota [=filename]
	    If quotas are to be	enforced for users or groups, one or both of
	    the	options	must be	specified.  If userquota is specified, user
	    quotas are to be enforced.	If groupquota is specified, group
	    quotas are to be enforced.	See also quotaon(8) and	quotaoff(8).

	    These options can also specify the location	of the quota files;
	    either userquota, groupquota, or both can be specified.  When the
	    quota commands (for	example, quotacheck and	quotaon) are run,
	    they first access the quota	files.	By default, user and group
	    quotas for a file system are contained in the quota.user and
	    quota.group	files, which are located in the	directory specified
	    by the mount point.	 For example, the quotas for the file system
	    on which /usr is mounted are located in the	/usr directory.	 You
	    also can specify another file name and location.  For example:

	    userquota=/var/quotas/tmp.user

	    Note that quota options apply only to UFS and AdvFS	file systems.

  xx	    Specifies that the file system entry should	be ignored.

  There	are no default mount options. The mount	operation fails	if you do not
  specify a mount option or if you specify an incorrect	mount option.  See
  mount(8) for a complete list and description of valid	mount options for the
  various file system types.

  The fifth field, (backup), is	used by	the dump command to determine which
  file systems need to be backed up.  If the fifth field is not	present, a
  value	of zero	is returned and	dump assumes that the file system does not
  need to be backed up.	 AdvFS ignores this field.

  For UFS  file	systems, the sixth field, (pass	number), is used by the	fsck
  and quotacheck commands to determine the order in which file system checks
  are done at reboot time.  For	the root file system, specify 1	in the pass
  field.  For other UFS	file systems specify 2 or higher in the	pass number
  field.

  For AdvFS filesets, the sixth	field is a pass	number field that allows the
  quotacheck command to	perform	all of the consistency checks needed for the
  fileset.  For	the root file system, specify 1	in the pass field.   For
  other	AdvFS file systems specify 2 or	higher in the pass number field.

  File systems that are	on the same disk or domain are checked sequentially,
  but file systems on different	disks or domains but with the same greater
  than 1 pass number are checked at the	same time to utilize parallelism
  available in the hardware.  When all the file	systems	in a pass have com-
  pleted their checks, then the	file systems with the numerically next higher
  pass number will be processed.

  The UFS per disk drive logic is based	on the /dev/disk/dsk0a syntax where
  different partition letters are treated as being on the same disk drive.
  Partitions layered on	top of an LSM device may not follow this naming	con-
  vention.  In this case unique	pass numbers may be used to sequence fsck and
  quotacheck processing.

  If the sixth field is	not present or zero, a value of	zero is	returned and
  the fsck command assumes that	the file system	does not need to be checked.

  The following	information is from the	/usr/include/fstab.h file:

       struct fstab {
	       char    *fs_spec;       /* block	special	device name */
	       char    *fs_file;       /* file system path prefix */
	       char    *fs_vfstype;    /* type of file system */
	       char    *fs_mntops;     /* comma	separated mount	options	*/
	       char    *fs_type;       /* rw, ro, or xx	*/
	       int     fs_freq;	       /* dump frequency, in days */
	       int     fs_passno;      /* pass number on parallel dump */
       };

  You can read records from the	/etc/fstab file	by using the getfsent(),
  getfsspec(), getfstype(), and	getfsfile() routines.




RELATED	INFORMATION

  Files: /usr/include/fstab.h

  Commands: advfs(4), getfsent(3), fsck(8), mount(8),
   quotaon(8), quotaoff(8), umount(8)