Configure Linux Auto Mount

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.