Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mntent(4) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fsck(1M)

mount(1M)

getmntent(3C)

MNTENT(4)  —  Silicon Graphics

NAME

mntent, fstab − static information about filesystems

SYNOPSIS

#include <mntent.h>

DESCRIPTION

The file /etc/fstab describes the filesystems used by the local machine.  The system administrator can modify it with a text editor.  It is read by commands that mount, unmount, and check the consistency of filesystems.  The file consists of a number of lines of the form:

fsname  dir  type  opts  freq  passno

For example:

/dev/si0a  /  efs  rw,raw=/dev/rsi0a  0  0

Fields are separated by white space; a ‘#’ as the first non-white character of a line indicates a comment. 

The entries from this file are accessed using the routines in getmntent(3C), which returns a structure of the following form:

struct mntent {
char∗mnt_fsname;/∗ filesystem name ∗/
char∗mnt_dir;/∗ filesystem path prefix ∗/
char∗mnt_type;/∗ efs, bell, nfs, or ignore ∗/
char∗mnt_opts;/∗ rw, ro, noquota, quota, hard, soft ∗/
intmnt_freq;/∗ dump frequency, in days ∗/
intmnt_passno;/∗ pass number on parallel fsck ∗/
};

The mnt_dir fields is the full path name of the directory to be mounted on. 

The mnt_type field determines how the mnt_fsname and mnt_opts fields will be interpreted.  Here is a list of the filesystem types currently supported, and the way each of them interprets these fields:

efs Extent File System (mnt_fsname must be a block special device). 

bell Bell File System (mnt_fsname must be a block special device). 

nfs Network File System (mnt_fsname must be the path on the server of the directory to be served of the form hostname:pathname).

ignore Ignore the entry.  This is useful to show disk partitions not currently used. 

The mnt_opts field contains a list of comma-separated option words.  Some mnt_opts are valid for all filesystem types, while others apply to a specific type only.  mnt_opts valid for all file system types are:

rwread/write (default). 

roread-only. 

suidset-uid execution allowed (default, can not be disabled). 

hideignore this entry during a mount −a command to allow you to define fstab entries for commonly used file systems you don’t want to automatically mount. 

mnt_opts specific to efs and bell file systems are:

fsckfsck(1M) invoked with no filesystem arguments should check this filesystem (default).

nofsckfsck should not check this filesystem by default. 

raw=paththe filesystem’s raw device interface pathname. 

mnt_opts specific to nfs file systems are:

bgif the first mount attempt fails, retry in the background. 

fgretry in the foreground. 

retry=nset number of mount failure retries to n. 

rsize=nset read buffer size to n bytes. 

wsize=nset write buffer size to n bytes. 

timeo=nset NFS timeout to n tenths of a second. 

retrans=nset number of NFS retransmissions to n. 

port=nset server IP port number to n. 

softreturn error if server doesn’t respond. 

hardretry request until server responds. 

The bg option causes mount to run in the background if the server’s mountd(1M) does not respond. mount attempts each request retry=n times before giving up.  If bg is specified and retry is not specified, it defaults to 10000.  Once the filesystem is mounted, each NFS request made in the kernel waits timeo=n tenths of a second for a response.  If no response arrives, the time-out is multiplied by 2 and the request is retransmitted.  When retrans=n retransmissions have been sent with no reply a soft mounted filesystem returns an error on the request and a hard mounted filesystem retries the request.  Filesystems that are mounted rw (read/write) should use the hard option.  The number of bytes in a read or write request can be set with the rsize and wsize options.  The default options are:

fg,hard,retry=0,timeo=7,retrans=4,port=NFS_PORT

with defaults for rsize and wsize set by the kernel. 

mnt_freq and mnt_passno are not supported. 

FILES

/etc/fstabstatic data
/etc/mtabdynamic data (i.e., those file systems currently mounted)

SEE ALSO

fsck(1M), mount(1M), getmntent(3C). 

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026