Scroll to navigation

FSTAB(5) Fomatos de fichero FSTAB(5)

NOMBRE

fstab - Información estática sobre los sistemas de ficheros

SINOPSIS

/etc/fstab

DESCRIPCIÓN

The file fstab contains descriptive information about the filesystems the system can mount. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file. The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.

The file is not read by mount(8) only but often is used by many other tools and daemons, and proper functionality may require additional steps. For example, on systemd-based systems, it’s recommended to use systemctl daemon-reload after fstab modification.

Cada linea representa un sistema de ficheros. Los campos de dicha línea están separados por tabulaciones o espacios. Las líneas que comienzan por "#" se consideran comentarios y se ignoran al igual que las líneas en blanco.

Un ejemplo típico de una entrada de fstab sería el siguiente:

LABEL=t-home2   /home      ext4    defaults,auto_da_alloc      0  2

Primer campo (fs_spec).

This field describes the block special device, remote filesystem or filesystem image for loop device to be mounted or swap file or swap device to be enabled.

Para los montajes más habituales, contendrá (un enlace a) un nodo de dispositivo especial de bloque (creado por mknod(2)) para el dispositivo que se va a montar, por ejemplo: /dev/cdrom o /dev/sdb7. Para NFS, este campo es <host>:<dir>, por ejemplo, knuth.aeb.nl:/. Para sistemas de ficheros sin almacenamiento, se puede usar cualquier cadena y se mostrará en la salida df(1), por ejemplo. El uso típico es proc para procfs; mem, none o tmpfs para tmpfs. Otros sistemas de ficheros especiales, como udev y sysfs, normalmente no se enumeran en fstab.

En lugar de indicar un nombre de dispositivo, puede indicarse LABEL=<label> o UUID=<uuid>. Esta es mejor práctica ya que los nombres de dispositivo suelen depender del orden de detección del hardware y puede sufrir modificaciones cuando se añade o elimina algún disco. Por ejemplo LABEL=Boot' o `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (Emplea una herramienta específica como e2label(8), xfs_admin(8), o fatlabel(8) para definir el valor de LABEL).

También pueden usarse los identificadores de particiones PARTUUID= y PARTLABEL= cuyo soporte está incluido por ejemplo en la tabla de particiones GUID (GPT).

Consulte mount(8), blkid(8) o lsblk(8) para mayor información acerca de los identificadores de dispositivos.

Observe que mount(8) emplea UUIDs como cadenas. Estas cadenas deben estar formadas por minúsculas. Sin embargo, cuando se define el nombre de sistemas de fichero FAT o NTFS se emplean mayúsculas (por ejemplo:UUID="A40D-85E7" o UUID="61DB7756DB7779B3").

Segundo campo (fs_file).

This field describes the mount point (target) for the filesystem. For swap area, this field should be specified as `none'. If the name of the mount point contains spaces or tabs these can be escaped as `\040' and '\011' respectively.

Tercer campo (fs_vfstype).

This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat, ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).

Una entrada swap definirá un fichero o partición para el uso como intercambio de datos. Consulte swapon(8). Una entrada none es util para anclar o mover puntos de montaje.

Es posible definir más de un tipo separándolos por comas.

mount(8) and umount(8) support filesystem subtypes. The subtype is defined by '.subtype' suffix. For example 'fuse.sshfs'. It’s recommended to use subtype notation rather than add any prefix to the first fstab field (for example 'sshfs#example.com' is deprecated).

Cuarto campo (fs_mntops).

Este campo describe las opciones de montaje asociadas con el sistema de ficheros.

It is formatted as a comma-separated list of options and is optional for mount(8) or swapon(8). The usual convention is to use at least "defaults" keyword there.

It usually contains the type of mount (ro or rw, the default is rw), plus any additional options appropriate to the filesystem type (including performance-tuning options). For details, see mount(8) or swapon(8).

Las opciones básicas independientes del tipo de ficheros son las siguientes:

defaults

use default options. The default depends on the kernel and the filesystem. mount(8) does not have any hardcoded set of default options. The kernel default is usually rw, suid, dev, exec, auto, nouser, and async.

noauto

no se monta cuando se ejecuta mount -a (por ejemplo durante el inicio)

user

permite que un cualquier usuario lo monte

owner

permite que el dueño del dispositivo pueda montarlo

comment

o x-<nombre> para los programas que mantienen fstab

nofail

no emite un mensaje de error si el dispositivo no existe.

Quinto campo (fs_freq).

Empleado por dump(8) para definir qué sistemas de ficheros deben ser volcados. Si no existe, se considera el valor cero (no volcar).

Sexto campo (fs_passno).

fsck(8) utiliza este campo para determinar el orden en el que se realizan las comprobaciones del sistema de ficheros en el momento del arranque. El sistema de ficheros raíz debería contener un valor para fs_passno de 1. El resto de sistemas de ficheros deberían tener fs_passno de 2. Los sistemas de ficheros dentro de una unidad se verificarán secuencialmente, pero los sistemas de ficheros en diferentes unidades se verificarán al mismo tiempo para aprovechar las opción del paralelismo disponible en el hardware. El valor predeterminado es cero (no comprobar) si no existe este campo.

FICHEROS

/etc/fstab, <fstab.h>

NOTAS

La forma apropiada de leer los registros de fstab es usando las rutinas getmntent(3) o libmount.

La palabra clave ignore para definir el tipo de fichero (en el tercer campo) está obsoleta y no puede usarse con la apliación mount basada en libmount (desde la versión util-linux 2.22).

This document describes handling of fstab by util-linux and libmount. For systemd, read systemd documentation. There are slight differences.

HISTORIA

El formato del fichero fstab surgió en la version 4.0 de BSD.

VÉASE TAMBIÉN

getmntent(3), fs(5), findmnt(8), mount(8), swapon(8)

INFORMAR DE ERRORES

For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

DISPONIBILIDAD

fstab is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.

2024-04-26 util-linux 2.40