Fstab is file system table your operating system. fstab file location:
/etc/fstab
In a Linux-based system, /etc/fstab file is one of the most important files. It contains all available disks, disk partitions and their options. You can open and see your fstab file system as follows
vi /etc/fstab
Check mount information of partition /dev/sdb1
lsblk -d -fs /dev/sdb1
If you add new hard disk or repartition an existing one, you’ll have to modify this file. And for every partition has been described on a separate line and each line contains six fields which provide information about its mount.
- Device is the first field represents disk or partition name. Most distributions specify partitions by their labels or UUIDs.
/dev/sda1
or
80b496fa-ce2d-4dcf-9afc-bcaa731a67f1
- Mount point is the second field represents directory where the partition or disk will be mounted. And the directory should be an empty directory.
/backup
- File system type the third field represents the file system type.
ext4
- Options is the fourth field represents the mount options. Here, we will use default options. Default mount options sets are:
- rw (read-write);
- suid (respect setuid and setgid bits);
- dev (interpret characters and block devices on the filesystem);
- exec (allow executing binaries and scripts);
- auto (mount the filesystem when the -a option of the mount command is used);
- nouser (make the filesystem not mountable by a standard user);
- async (perform I/O operations on the filesystem asynchronously).
defaults
- Backup operation is the fifth field and can be either 0 or 1. ‘1’, if the dump utility should back up a partition and ‘0’, if it shouldn’t.
1
- File system check order is the sixth field represents fsck checks order for device/partition errors at boot time. ‘0’ means that fsck should not check file system. Higher numbers represent the check order. The root partition have value ‘1’ and all others should have value from 2.
2
Check mount information of partition /dev/sdb1
lsblk -d -fs /dev/sdb1