Setting default mounts and options in fstab
In the previous section, we introduced how disks and partitions can be mounted so that our services and users can make use of them. In this section, we will learn how to make those filesystems available in a persistent way.
The /etc/fstab
file contains the filesystem definitions for our system and, of course, it has a dedicated manual page that can be checked with man fstab
containing useful information about the formatting, fields, ordering, and so on that must be taken into consideration, as this file is critical for the smooth operation of the system.
The file format is defined by several fields separated by tabs or spaces, with lines starting with a #
considered as comments.
For example, we will use this line to look at each field description:
LABEL=/ / xfs defaults 0 0
The first field is the device definition, which can be a special block device, a remote filesystem, or—as we can see—a selector made by LABEL...