When CentOS is started, ext4 partitions are automatically mounted.

Source: Internet
Author: User
Tags custom name
During Linux installation, only about GB space is allocated to Linux, so another TB backup disk is mounted for resource storage and system backup, however, after the system enters the system upon startup, the system needs to manually mount the data on the backup disk. Therefore, if you want to enable automatic mounting upon system startup, you can simply record the operation process. First, run the df command to view the name of the partition to be mounted. [Jeffery @ CentOS ~] $ D

During Linux installation, only about GB space is allocated to Linux, so another TB backup disk is mounted for resource storage and system backup, however, after the system enters the system upon startup, the system needs to manually mount the data on the backup disk. Therefore, if you want to enable automatic mounting upon system startup, you can simply record the operation process.

 

First, run the df command to view the name of the partition to be mounted.

[Jeffery @ CentOS ~] $ Df-k

You can see the name of the partition to be mounted. you can determine the partition size. ^ 0 ^

 

Edit the/etc/fstab file.

[Jeffery @ CentOS ~] $ Sudo vim/etc/fstab

Add the mounting configuration information at the end.

/Dev/sdb1             /Media/Bak1                           Ext4  ULTS      0 0
/Dev/sdb2             /Media/Bak2                           Ext4  ULTS      0 0

The first column is the partition name, and the second column is the path to be mounted. we usually mount it to/media. remember to create your own Bak (custom name) folder and open permissions, otherwise, an error message indicating that only the root user can be mounted will be prompted. The third column is the file format of the partition.

 

After the instance is restarted, you can see that it is automatically mounted at startup. ^ 0 ^

Related Article

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.