Fstab
Encyclopedia : F : FS : FST : Fstab
- The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
Traditionally, the fstab was only read by programs, and not written. However, more modern system administration tools can automatically build and edit fstab, or act as graphical editors for it. 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 a fstab file on a Red Hat Linux system:
LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0
- device name mount point fs-type options dump-freq pass-num
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
- my removable media
/dev/hda1 /mnt/WinXP ntfs ro,defaults 0 0
- my NTFS Windows XP partition
/dev/hda6 swap swap defaults 0 0
/dev/hda7 /mnt/shared vfat umask=000 0 0
- my files partition shared by windows and linux
(kudzu is an option specific to Red Hat and Fedora Core)
The first column indicates the device name or other means of locating the partition or data source. The second column indicates where the data is to be attached to the filesystem. The third column indicates the filesystem type, or algorithm to use to interpret the filesystem. The fourth column gives options, including if the filesystem should be mounted at boot. The fifth column adjusts the archiving schedule for the partition (used by dump). The sixth column 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).
To get more information about the fstab file you can read the man page about it.
The Kfstab graphical configuration utility is available for KDE for editing fstab.
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:
sync / asyncAll I/O to the file system should be done (a)synchronously.
autoThe filesystem can be mounted automatically (at bootup, or when mount is passed the -a option). This is really unnecessary as this is the default action of mount -a anyway.
noautoThe filesystem will NOT be automatically mounted at startup, or when mount passed -a. You must explicitly mount the filesystem.
dev / nodevPermit any user to mount the filesyste. This automatically implies noexec,
exec / noexecPermit/Prevent the execution of binaries from the filesystem.
suid / nosuidPermit/Block the operation of suid, and sgid bits.
roMount read-only.
rwMount read-write.
userPermit any user to mount the filesystem. This automatically implies noexec, nosuid,nodev unless overridden.
nouserOnly permit root to mount the filesystem. This is also a default setting.
defaultsUse default settings. Equivalent to rw,suid,dev,exec,auto,nouser,async.
There are numerous options for the specific filesystems supported by mount. However these are some of the more useful, for the full list check out the man page for `mount`.
ext2
check=Sets the fsck checking level.
debugprint debugging info on each remount.
sb=nn is the block which should be used as the superblock for the fs.
fat
check=Not the same as ext2. Rather deals with allowed filenames. See mount(8).
conv=Performs DOS<->UNIX text file conversions automatically. See mount(8).
uid=n, gid=nSet the uid, gid for all files on the filesystem.
iso9660
norockDisables Rock Ridge extensions.
See also
External links
- [fstab man page] via OpenBSD
- [fstab man page] by NetBSD
- [fstab man page] via FreeBSD
- [fstab man page] from Linux
- [How to edit and understand /etc/fstab]
- [Kfstab]
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
