Using the Mount command to mount the hardware, these mount information is lost after a Linux reboot, so the hardware that corresponds to the disk needs to be automatically mounted to ensure that the system restarts automatically.
Automatic mount information saved in the file/etc/fstab file
To view the data for this file:
[Email protected] dev]#Cat/etc/fstab##/etc/fstab# Created by Anaconda on Wed - -: $: . .# # Accessible filesystems, by reference, is maintained under'/dev/disk'# SeeMansPages Fstab (5), Findfs (8),Mount(8) and/or Blkid (8) for More Info#/DEV/MAPPER/CENTOS-ROOT/XFS defaults1 1UUID=323ea65e-97e7-4935-876c-c73fb83994d5/boot XFS Defaults1 2/dev/mapper/centos-swap Swap swap Defaults0 0
Each record corresponds to one mount, each record has six fields, each of which stores information as:
/dev/hda,/dev/hdb,/DEV/HDC, and so on, and each disk partition is labeled/DEV/HDA1,/dev//dev/sda,/dev/SDB, and so on. Partitioning is the same. If the label is used, the format:1 lable=/ /root directory partition is always 1. Other partitions start at 2, the smaller the number, the first check if the number of two partitions is the same.
Typically the user automatically mounts the partition, and the sixth column value should be set to 2 instead of 1.
After the modifications are complete, you can use the following command to load the tests:
# # Reload/etc/fstabMount -A
If you modify the/ect/fstab error, causing the automatic mount to fail, you can log on locally to the server, because the mount fails, the partition where the configuration file resides is not mounted as read-write mode, so you need to mount the root directory first
# # Reload config file to resolve Mount profile read-only issues Mount -o REMOUNT,RW/
Then modify the Mount profile and save and re-mount it.
Configure Linux Auto Mount