The general server has multiple hard disk partitions, which may change when the logical location of these partitions is loaded after a reboot, and may cause confusion due to changes in disk order if the disk is mounted using traditional device names (for example:/DEV/SDA).
Each block device in the Linux environment has a globally unique UUID that identifies the device, and we can replace the device name with a UUID in the fstab so that this confusion does not occur.
1. Take SDB1 as an example, first use the LSBLK command to get a clear picture of the global block device layout.
2. Then use the sudo blkid command to get the device's UUID. Copy note the UUID of SDB1. (sudo permission required)
3.VI Edit/etc/fstab file system information.
[[Email protected]/]# vim/etc/fstab
4. Add a line at the end. Then save the exit.
5. After rebooting, Df-h can see that the SDB1 has been loaded automatically.
How Linux automatically mounts disk partitions based on UUID