Understanding the /etc/fstab file
The /etc/fstab
file is a very critical file on your Linux system. You can edit this file to call out additional volumes you would like to automatically mount at boot time. However, the main purpose of this file is to also mount your main filesystem, so if you make a mistake while editing it, your server will not boot. Definitely be careful here.
Analyzing the contents of /etc/fstab
When your system boots, it looks at the /etc/fstab
file to determine where the root filesystem is. In addition, the location of your swap
area is read from this file and mounted at boot time as well. Your system will also read any other mount points listed in this file, one per line, and mount them. Basically, just about any kind of storage you can think of can be added to this file and automatically mounted. Even network shares from Windows servers can be added here. It won't judge you (unless you make a typo).
As an example, here are the contents of ...