Fstab

Fstab

The fstab (for "file systems table") file is commonly found on Unix systems as part of the system configuration. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system's file system.

The fstab file is most commonly used by the mount command, which reads the fstab file to determine which options should be used when mounting the specified device.

Traditionally, the fstab was only read by programs, and not written. However, some administration tools can automatically build and edit fstab, or act as graphical editors for it, such as the Kfstab graphical configuration utility available for KDE. Modern systems use udev to handle hot swapping devices instead of rewriting fstab file on the fly. It is the duty of the system administrator to properly create and maintain this file.

The file may have other names on a given Unix variant; for example, it is /etc/vfstab on Solaris.

Example

The following is an example of an fstab file on a Red Hat Linux system:


# device name mount point fs-type options dump-freq pass-numLABEL=/ / ext3 defaults 1 1/dev/hda6 swap swap defaults 0 0none /dev/pts devpts gid=5,mode=620 0 0none /proc proc defaults 0 0none /dev/shm tmpfs defaults 0 0

# Removable media/dev/cdrom /mount/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0/dev/fd0 /mount/floppy auto noauto,owner,kudzu 0 0

# NTFS Windows XP partition/dev/hda1 /mnt/WinXP ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0

# Partition shared by Windows and Linux/dev/hda7 /mnt/shared vfat umask=000 0 0

# mounting tmpfstmpfs /mnt/tmpfschk tmpfs size=100m 0 0

The columns are as follows:

# The "device name" or other means of locating the partition or data source.
# The "mount point", where the data is to be attached to the filesystem.
# The "filesystem type", or the algorithm used to interpret the filesystem.
# "Options", including if the filesystem should be mounted at boot. ("kudzu" is an option specific to Red Hat and Fedora Core.)
# "dump-freq" adjusts the archiving schedule for the partition (used by dump).
# "pass-num" indicates the order in which the fsck utility will scan the partitions for errors when the computer powers on.

A value of zero in either of the last 2 columns disables the corresponding feature. [http://www.humbug.org.au/talks/fstab/fstab_structure.html]

Options common to all filesystems

As the filesystems in /etc/fstab will eventually be mounted using mount(8) it isn't surprising that the options field simply contains a comma-separated list of options which will be passed directly to mount when it tries to mount the filesystem.

The options common to all filesystems are:

; auto / noauto: With the auto option, the device will be mounted automatically at bootup or when the mount -a command is issued. auto is the default option. If you don't want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be mounted only explicitly..; dev / nodev: Interpret/do not interpret block special devices on the filesystem.; exec / noexec: exec lets you execute binaries that are on that partition, whereas noexec doesn't let you do that. noexec might be useful for a partition that contains no binaries, like /var, or contains binaries you don't want to execute on your system, or that can't even be executed on your system. Last might be the case of a Windows partition.; ro: Mount read-only.; rw: Mount the filesystem read-write. Again, using this option might alleviate confusion on the part of new Linux users who are frustrated because they can't write to their floppies, Windows partitions, or other media.; sync / async: How the input and output to the filesystem should be done. sync means it's done synchronously. If you look at the example fstab, you'll notice that this is the option used with the floppy. In plain English, this means that when you, for example, copy a file to the floppy, the changes are physically written to the floppy at the same time you issue the copy command.; suid / nosuid: Permit/Block the operation of suid, and sgid bits.; user / users / nouser: user permit any user to mount the filesystem. This automatically implies noexec, nosuid, nodev unless overridden. If nouser is specified, only root can mount the filesystem. If users is specified, every user in group "users" will be able to unmount the volume.; owner (This is Linux specific): Permit the owner of device to mount.; defaults: Use default settings. Equivalent to rw,suid,dev,exec,auto,nouser,async.

Filesystem specific options

There are many options for the specific filesystems supported by mount. Listed below are some of the more commonly used. For the full list check out the man page for mount.

ext2

; check={none, normal, strict}: Sets the fsck checking level.; debug: Print debugging info on each remount .; sb=n: n is the block which should be used as the superblock for the fs.

fat

; check={r [elaxed] , n [ormal] , s [trict] }: Not the same as ext2, but rather deals with allowed filenames. See mount(8).; conv={b [inary] , t [ext] , a [uto] }: Performs DOS<->UNIX text file conversions automatically. See mount(8).; uid=n, gid=n: Sets the user identifier, uid, and group identifier, gid, for all files on the filesystem.; umask=nnn, dmask=nnn, fmask=nnn: Sets the user file creation mode mask, umask, the same for directories only, dmask and for files only, fmask.

iso9660

; norock: Disables Rock Ridge extensions.

More detailed information about the fstab file can be found in the man page about it. [http://www.die.net/doc/linux/man/man5/fstab.5.html]

Mounting all filesystems

mount -aThis command will mount all (not-yet-mounted) filesystems mentioned in fstab and is used in system script startup during booting.

Pronunciation

There is some debate regarding the pronunciation of fstab. Variations include "Eff-ess-tab", "F-stab" or even just "stab" with a hint of "F".

ee also

* mtab
* mount (computing)

External links

* [http://www.openbsd.org/cgi-bin/man.cgi?query=fstab&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html fstab man page] via OpenBSD
* [http://netbsd.gw.com/cgi-bin/man-cgi?fstab++NetBSD-current fstab man page] by NetBSD
* [http://www.freebsd.org/cgi/man.cgi?query=fstab&apropos=0&sektion=0&manpath=FreeBSD+5.4-RELEASE+and+Ports&format=html fstab man page] via FreeBSD
* [http://man.he.net/?topic=fstab&section=all fstab man page] from Linux
* [http://www.tuxfiles.org/linuxhelp/fstab.html How to edit and understand /etc/fstab]
* [http://kfstab.sourceforge.net/ Kfstab]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Fstab — Le fichier fstab (file systems table) est la table des différents systèmes de fichiers sur un ordinateur sous Unix/linux : il contient la liste de tous les disques utilisés et des partitions de ces disques. Pour chaque partition, il indique… …   Wikipédia en Français

  • Fstab — Saltar a navegación, búsqueda El fichero fstab (file systems table) se encuentra comúnmente en sistemas Unix (en el directorio /etc/) como parte de la configuración del sistema. Lo mas destacado de este fichero es la lista de discos y particiones …   Wikipedia Español

  • Fstab — один из конфигурационных файлов в UNIX подобных системах, который содержит информацию о различных файловых системах и устройствах хранения информации компьютера; описывает, как диск (раздел, партиция) будет использоваться или как будет… …   Википедия

  • fstab — (сокр. от англ. file systems table)  один из конфигурационных файлов в UNIX подобных системах, который содержит информацию о различных файловых системах и устройствах хранения информации компьютера; описывает, как диск (раздел) будет… …   Википедия

  • fstab — The fstab (/etc/fstab) (or file systems table) file is a system configuration file commonly found on Unix systems. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise… …   Wikipedia

  • fstab — Le fichier fstab (file systems table) est la table des différents systèmes de fichiers sur un ordinateur sous Unix/Linux : il contient une liste des disques utilisés au démarrage et des partitions de ces disques. Pour chaque partition, il… …   Wikipédia en Français

  • fstab — El fichero fstab (file systems table) se encuentra comúnmente en sistemas Unix (en el directorio /etc/) como parte de la configuración del sistema. Lo mas destacado de este fichero es la lista de discos y particiones disponibles. En ella se… …   Wikipedia Español

  • Fstab — Unter unixartigen Betriebssystemen existiert eine Datei /etc/fstab, die eine Liste aller zu mountenden Dateisysteme enthält. Die verwendbaren Optionen unterscheiden sich oft je nach Plattform, Dateisystem und Alter des Betriebssystems.… …   Deutsch Wikipedia

  • fstab — Die Datei /etc/fstab oder /etc/vfstab enthält eine Liste aller zu mountenden Dateisysteme in unixartigen Betriebssystemen. Die verwendbaren Optionen unterscheiden sich oft je nach Plattform, Dateisystem und Alter des Betriebssystems.… …   Deutsch Wikipedia

  • FSTAB — File System Table (siehe /etc/fstab) …   Acronyms

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”